--- zzzz-none-000/linux-2.6.39.4/include/net/inet_hashtables.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/include/net/inet_hashtables.h 2021-11-10 13:38:18.000000000 +0000 @@ -87,7 +87,7 @@ struct hlist_head owners; }; -static inline struct net *ib_net(struct inet_bind_bucket *ib) +static inline struct net *ib_net(struct inet_bind_bucket *ib __maybe_unused) { return read_pnet(&ib->ib_net); } @@ -384,10 +384,18 @@ if (unlikely(sk = skb_steal_sock(skb))) return sk; - else - return __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, - iph->saddr, sport, - iph->daddr, dport, inet_iif(skb)); +#ifdef CONFIG_AVM_PA + sk = __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + iph->saddr, sport, + iph->daddr, dport, inet_iif(skb)); + if (sk) + avm_pa_add_local_session(skb, sk); + return sk; +#else + return __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + iph->saddr, sport, + iph->daddr, dport, inet_iif(skb)); +#endif } extern int __inet_hash_connect(struct inet_timewait_death_row *death_row,