--- zzzz-none-000/linux-4.9.276/net/ipv6/ip6_output.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/net/ipv6/ip6_output.c 2023-04-05 08:19:02.000000000 +0000 @@ -58,6 +58,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); @@ -250,6 +252,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 */ @@ -359,6 +365,8 @@ __IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS); __IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len); + avm_pa_mark_routed(skb); + return dst_output(net, sk, skb); } @@ -579,6 +587,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_copy_secmark(to, from); }