--- zzzz-none-000/linux-4.4.60/include/net/inet6_hashtables.h 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/include/net/inet6_hashtables.h 2021-02-04 17:41:59.000000000 +0000 @@ -26,6 +26,10 @@ #include #include +#ifdef CONFIG_AVM_PA +#include +#endif + struct inet_hashinfo; static inline unsigned int __inet6_ehashfn(const u32 lhash, @@ -84,12 +88,19 @@ struct sock *sk = skb_steal_sock(skb); if (sk) - return sk; + goto out; - return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + sk = __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, &ipv6_hdr(skb)->saddr, sport, &ipv6_hdr(skb)->daddr, ntohs(dport), iif); + +out: +#ifdef CONFIG_AVM_PA + if (sk) + avm_pa_add_local_session(skb, sk); +#endif + return sk; } struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,