--- zzzz-none-000/linux-5.15.111/net/ipv6/ip6_input.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/ipv6/ip6_input.c 2024-02-07 09:28:09.000000000 +0000 @@ -14,6 +14,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 @@ -275,6 +280,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. */