--- zzzz-none-000/linux-5.4.213/net/ipv6/ip6_output.c 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/net/ipv6/ip6_output.c 2024-05-29 11:20:02.000000000 +0000 @@ -55,6 +55,8 @@ #include #include +#include + static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); @@ -340,6 +342,10 @@ if (unlikely(!skb)) return 0; + /* For UDP, ICMPv6 and XFRM, see __ip6_local_out() */ + if (avm_pa_dev_local_out(AVM_PA_NET_IP6_DEVINFO(net), skb) == AVM_PA_RX_STOLEN) + return 0; + /* hooks should never assume socket lock is held. * we promote our socket to non const */ @@ -463,6 +469,9 @@ #endif skb->tstamp = 0; + + avm_pa_mark_routed(skb); + return dst_output(net, sk, skb); } @@ -660,6 +669,9 @@ #ifdef CONFIG_NET_SCHED to->tc_index = from->tc_index; #endif +#ifdef CONFIG_AVM_PA + memcpy(AVM_PKT_INFO(to), AVM_PKT_INFO(from), sizeof(*AVM_PKT_INFO(to))); +#endif nf_copy(to, from); skb_ext_copy(to, from); skb_copy_secmark(to, from);