--- zzzz-none-000/linux-4.4.60/net/ipv6/ip6_output.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/net/ipv6/ip6_output.c 2021-02-04 17:41:59.000000000 +0000 @@ -57,6 +57,10 @@ #include #include +#ifdef CONFIG_AVM_PA +#include +#endif + static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); @@ -333,6 +337,9 @@ struct sk_buff *skb) { skb_sender_cpu_clear(skb); +#ifdef CONFIG_AVM_PA + avm_pa_mark_routed(skb); +#endif return dst_output(net, sk, skb); } @@ -552,6 +559,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); } @@ -1353,11 +1363,12 @@ */ cork->length += length; - if (((length > mtu) || - (skb && skb_is_gso(skb))) && + if ((skb && skb_is_gso(skb)) || + (((length + (skb ? skb->len : headersize)) > mtu) && + (skb_queue_len(queue) <= 1) && (sk->sk_protocol == IPPROTO_UDP) && - (rt->dst.dev->features & NETIF_F_UFO) && - (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk)) { + (rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) && + (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk))) { err = ip6_ufo_append_data(sk, queue, getfrag, from, length, hh_len, fragheaderlen, exthdrlen, transhdrlen, mtu, flags, fl6);