Skip to content

Commit 1796a81

Browse files
Andreas Schultzdavem330
authored andcommitted
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>
1 parent 1093192 commit 1796a81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/gtp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb,
198198
pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid));
199199
if (!pctx) {
200200
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb);
201-
return -1;
201+
return 1;
202202
}
203203

204204
if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
205205
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
206-
return -1;
206+
return 1;
207207
}
208208

209209
/* 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,
247247
pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid));
248248
if (!pctx) {
249249
netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb);
250-
return -1;
250+
return 1;
251251
}
252252

253253
if (!gtp_check_src_ms(skb, pctx, hdrlen)) {
254254
netdev_dbg(gtp->dev, "No PDP ctx for this MS\n");
255-
return -1;
255+
return 1;
256256
}
257257

258258
/* Get rid of the GTP + UDP headers. */

0 commit comments

Comments
 (0)