Skip to content

Commit e4f88f7

Browse files
committed
gtp: pass up link local traffic to userspace socket
According to TS 29.061, it is possible to see IPv6 link-local traffic in the GTP tunnel, see 11.2.1.3.2 IPv6 Stateless Address Autoconfiguration (IPv6 SLAAC). Pass up these packets to the userspace daemon to handle them as control GTP traffic. Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent c6461ec commit e4f88f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/gtp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ static bool gtp_check_ms_ipv6(struct sk_buff *skb, struct pdp_ctx *pctx,
251251

252252
ip6h = (struct ipv6hdr *)(skb->data + hdrlen);
253253

254+
if ((ipv6_addr_type(&ip6h->saddr) & IPV6_ADDR_LINKLOCAL) ||
255+
(ipv6_addr_type(&ip6h->daddr) & IPV6_ADDR_LINKLOCAL))
256+
return false;
257+
254258
if (role == GTP_ROLE_SGSN) {
255259
ret = ipv6_pdp_addr_equal(&ip6h->daddr, &pctx->ms.addr6);
256260
} else {

0 commit comments

Comments
 (0)