--- zzzz-none-000/linux-2.6.39.4/include/net/inet6_hashtables.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/include/net/inet6_hashtables.h 2021-11-10 13:23:10.000000000 +0000 @@ -100,10 +100,20 @@ if (unlikely(sk = skb_steal_sock(skb))) return sk; - else return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, - &ipv6_hdr(skb)->saddr, sport, - &ipv6_hdr(skb)->daddr, ntohs(dport), - inet6_iif(skb)); +#ifdef CONFIG_AVM_PA + sk = __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + &ipv6_hdr(skb)->saddr, sport, + &ipv6_hdr(skb)->daddr, ntohs(dport), + inet6_iif(skb)); + if (sk) + avm_pa_add_local_session(skb, sk); + return sk; +#else + return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + &ipv6_hdr(skb)->saddr, sport, + &ipv6_hdr(skb)->daddr, ntohs(dport), + inet6_iif(skb)); +#endif } extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,