summaryrefslogtreecommitdiffstats
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
authorAndreas Schultz <aschultz@tpip.net>2017-01-26 16:21:49 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-29 13:54:00 -0500
commit1796a81de4fbd3a93290de61e443ea4153ad28d4 (patch)
tree782f418d5045e6b93e824084b3cd1ccde4971d1b /drivers/net/gtp.c
parent10931923b5a5624d254ec3c8db6970f63b277cac (diff)
downloadop-kernel-dev-1796a81de4fbd3a93290de61e443ea4153ad28d4.zip
op-kernel-dev-1796a81de4fbd3a93290de61e443ea4153ad28d4.tar.gz
gtp: let userspace handle packets for invalid tunnels
enable userspace to send error replies for invalid tunnels Acked-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Andreas Schultz <aschultz@tpip.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index e11a1ea..bda0c64 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -198,12 +198,12 @@ static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb,
pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid));
if (!pctx) {
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb);
- return -1;
+ return 1;
}
if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
- return -1;
+ return 1;
}
/* Get rid of the GTP + UDP headers. */
@@ -247,12 +247,12 @@ static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb,
pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid));
if (!pctx) {
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb);
- return -1;
+ return 1;
}
if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
- return -1;
+ return 1;
}
/* Get rid of the GTP + UDP headers. */
OpenPOWER on IntegriCloud