From: Andreas Schultz Date: Thu, 26 Jan 2017 15:21:49 +0000 (+0100) Subject: gtp: let userspace handle packets for invalid tunnels X-Git-Tag: v4.11-rc1~124^2~298^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1796a81de4fbd3a93290de61e443ea4153ad28d4;p=thirdparty%2Fkernel%2Fstable.git gtp: let userspace handle packets for invalid tunnels enable userspace to send error replies for invalid tunnels Acked-by: Harald Welte Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller --- diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index e11a1ead32287..bda0c64134508 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. */