--- zzzz-none-000/linux-2.6.39.4/net/ipv6/ip6_input.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/net/ipv6/ip6_input.c 2021-11-10 13:38:18.000000000 +0000 @@ -18,6 +18,11 @@ * Mitsuru KANDA @USAGI and * YOSHIFUJI Hideaki @USAGI: Remove ipv6_parse_exthdrs(). */ + /* +Includes Intel Corporation's changes/modifications dated: [2/3/2014]. +Changed/modified portions - Copyright © [2014], Intel Corporation. +*/ + #include #include @@ -45,7 +50,7 @@ #include #include - +extern int intel_ns_handler (struct net_device *dev,struct in6_addr* dst_addr,unsigned char banned_flags); inline int ip6_rcv_finish( struct sk_buff *skb) { @@ -81,6 +86,10 @@ memset(IP6CB(skb), 0, sizeof(struct inet6_skb_parm)); +#ifdef CONFIG_AVM_PA + AVM_PKT_INFO(skb)->ptype_pid_handle = AVM_PA_PTYPE_DEVINFO(pt)->pid_handle; +#endif + /* * Store incoming device index. When the packet will * be queued, we cannot refer to skb->dev anymore. @@ -138,6 +147,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. */ @@ -182,7 +204,8 @@ raw = raw6_local_deliver(skb, nexthdr); hash = nexthdr & (MAX_INET_PROTOS - 1); - if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { + ipprot = rcu_dereference(inet6_protos[hash]); + if (ipprot) { int ret; if (ipprot->flags & INET6_PROTO_FINAL) {