--- zzzz-none-000/linux-3.10.107/include/net/inet_hashtables.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/include/net/inet_hashtables.h 2021-11-10 11:53:56.000000000 +0000 @@ -36,6 +36,10 @@ #include #include +#ifdef CONFIG_AVM_PA +#include +#endif + /* This is for all connections with a full identity, no wildcards. * One chain is dedicated to TIME_WAIT sockets. * I'll experiment with dynamic table growth later. @@ -89,7 +93,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); } @@ -393,10 +397,15 @@ if (sk) return sk; - else - return __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + + sk = __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, iph->saddr, sport, iph->daddr, dport, inet_iif(skb)); +#ifdef CONFIG_AVM_PA + if (sk) + avm_pa_add_local_session(skb, sk); +#endif + return sk; } extern int __inet_hash_connect(struct inet_timewait_death_row *death_row,