--- zzzz-none-000/linux-3.10.107/net/ipv4/udp.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/net/ipv4/udp.c 2021-11-10 11:53:56.000000000 +0000 @@ -111,6 +111,10 @@ #include #include "udp_impl.h" +#ifdef CONFIG_AVM_PA +#include +#endif + struct udp_table udp_table __read_mostly; EXPORT_SYMBOL(udp_table); @@ -551,10 +555,15 @@ if (unlikely(sk = skb_steal_sock(skb))) return sk; - else - return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport, - iph->daddr, dport, inet_iif(skb), - udptable); + + sk = __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport, + iph->daddr, dport, inet_iif(skb), + udptable); +#ifdef CONFIG_AVM_PA + if (sk) + avm_pa_add_local_session(skb, sk); +#endif + return sk; } struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, @@ -1592,6 +1601,11 @@ sk = sk_nulls_head(&hslot->head); dif = skb->dev->ifindex; sk = udp_v4_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif); + +#ifdef CONFIG_AVM_PA + if (sk) + avm_pa_add_local_session(skb, sk); +#endif while (sk) { stack[count++] = sk; sk = udp_v4_mcast_next(net, sk_nulls_next(sk), uh->dest,