--- zzzz-none-000/linux-4.9.279/net/ipv6/ip6_input.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/ipv6/ip6_input.c 2023-02-08 10:58:16.000000000 +0000 @@ -18,6 +18,11 @@ * Mitsuru KANDA @USAGI and * YOSHIFUJI Hideaki @USAGI: Remove ipv6_parse_exthdrs(). */ +/* + * Includes Intel Corporation's changes/modifications dated: 2014, 2018. + * Changed/modified portions - Copyright (c) 2014-2018, Intel Corporation. + */ + #include #include @@ -195,6 +200,19 @@ } } +#ifdef CONFIG_INTEL_NS_DEVICE_FILTER +/* filter neighbour solicit packets not targeted to the device*/ + if (hdr->nexthdr == IPPROTO_ICMPV6) + { + struct icmp6hdr *icmpv6_hdr; + icmpv6_hdr = icmp6_hdr(skb); + if (icmpv6_hdr->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) + { + if (intel_ns_handler (skb->dev,&(hdr->daddr),IFA_F_TENTATIVE) == 0) + goto drop; + } + } +#endif rcu_read_unlock(); /* Must drop socket now because of tproxy. */