Commit 1796a81d authored by Andreas Schultz's avatar Andreas Schultz Committed by David S. Miller

gtp: let userspace handle packets for invalid tunnels

enable userspace to send error replies for invalid tunnels
Acked-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarAndreas Schultz <aschultz@tpip.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 10931923
...@@ -198,12 +198,12 @@ static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, ...@@ -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)); pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid));
if (!pctx) { if (!pctx) {
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); 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)) { if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
return -1; return 1;
} }
/* Get rid of the GTP + UDP headers. */ /* 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, ...@@ -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)); pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid));
if (!pctx) { if (!pctx) {
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); 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)) { if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
return -1; return 1;
} }
/* Get rid of the GTP + UDP headers. */ /* Get rid of the GTP + UDP headers. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment