--- zzzz-none-000/linux-4.4.271/net/ipv4/udp.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/net/ipv4/udp.c 2023-01-11 09:25:44.000000000 +0000 @@ -114,6 +114,8 @@ #include #include "udp_impl.h" +#include + struct udp_table udp_table __read_mostly; EXPORT_SYMBOL(udp_table); @@ -580,8 +582,8 @@ const struct iphdr *iph = ip_hdr(skb); return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport, - iph->daddr, dport, inet_iif(skb), - udptable); + iph->daddr, dport, inet_iif(skb), + udptable); } struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, @@ -1027,7 +1029,8 @@ flowi4_init_output(fl4, ipc.oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE, sk->sk_protocol, flow_flags, - faddr, saddr, dport, inet->inet_sport); + faddr, saddr, dport, inet->inet_sport, + sk->sk_uid); if (!saddr && ipc.oif) { err = l3mdev_get_saddr(net, ipc.oif, fl4); @@ -1510,6 +1513,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { struct udp_sock *up = udp_sk(sk); + struct net *net = dev_net(skb->dev); int rc; int is_udplite = IS_UDPLITE(sk); @@ -1518,6 +1522,9 @@ */ if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) goto drop; + + avm_pa_add_local_session(AVM_PA_NET_IP_DEVINFO(net), skb, sk); + nf_reset(skb); if (static_key_false(&udp_encap_needed) && up->encap_type) {