diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2018-03-14 22:25:49 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2018-03-14 22:25:49 +0300 |
commit | 99fc79fd173f911596c0324046dd7515cf1dd7e7 (patch) | |
tree | c778168544d2e20e3a33be48c492f527f8d556d0 | |
parent | 89056070effd890afcefaefcd3ee257dc1a447ee (diff) | |
download | accel-ppp-99fc79fd173f911596c0324046dd7515cf1dd7e7.tar.gz accel-ppp-99fc79fd173f911596c0324046dd7515cf1dd7e7.zip |
ipoe_mod: accept ipv6 packets from link-local address if session does not exists
-rw-r--r-- | drivers/ipoe/ipoe.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 90b04cad..17aad5be 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -836,12 +836,12 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) if (ipoe_check_exclude(saddr)) return RX_HANDLER_PASS; - if (ipoe_check_network(saddr)) { - if (ipoe_queue_u(skb, saddr)) - kfree_skb(skb); - } else + if (ipoe_check_network(saddr) == 0) return RX_HANDLER_PASS; + if (ipoe_queue_u(skb, saddr)) + kfree_skb(skb); + return RX_HANDLER_CONSUMED; } } else if (skb->protocol == htons(ETH_P_IPV6)) { @@ -850,14 +850,16 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) ip6h = ipv6_hdr(skb); - if (ip6h->saddr.s6_addr16[0] == htons(0xfe80)) + if (ip6h->saddr.s6_addr16[0] == htons(0xfe80)) { ses = ipoe_lookup_hwaddr(eth->h_source); - else + if (!ses) + return RX_HANDLER_PASS; + } else { ses = ipoe_lookup_rt6(skb, &ip6h->saddr, &out); - - if (!ses) { - kfree_skb(skb); - return RX_HANDLER_CONSUMED; + if (!ses) { + kfree_skb(skb); + return RX_HANDLER_CONSUMED; + } } } else return RX_HANDLER_PASS; |