--- zzzz-none-000/linux-4.9.276/net/ipv4/ip_output.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/net/ipv4/ip_output.c 2023-04-05 08:19:02.000000000 +0000 @@ -81,6 +81,8 @@ #include #include +#include + static int ip_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned int mtu, @@ -110,6 +112,9 @@ skb->protocol = htons(ETH_P_IP); + if (avm_pa_dev_local_out(AVM_PA_NET_IP_DEVINFO(net), skb) == AVM_PA_RX_STOLEN) + return 0; + return nf_hook(NFPROTO_IPV4, NF_INET_LOCAL_OUT, net, sk, skb, NULL, skb_dst(skb)->dev, dst_output); @@ -300,8 +305,12 @@ if (skb_is_gso(skb)) return ip_finish_output_gso(net, sk, skb, mtu); - if (skb->len > mtu || IPCB(skb)->frag_max_size) + if (skb->len > mtu || IPCB(skb)->frag_max_size) { + if (skb->dev->type == ARPHRD_TUNNEL6) { + return ip_finish_output2(net, sk, skb); + } return ip_fragment(net, sk, skb, mtu, ip_finish_output2); + } return ip_finish_output2(net, sk, skb); } @@ -507,6 +516,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); #if IS_ENABLED(CONFIG_IP_VS) to->ipvs_property = from->ipvs_property; @@ -554,6 +566,9 @@ __be16 not_last_frag; struct rtable *rt = skb_rtable(skb); int err = 0; +#ifdef CONFIG_INTEL_IPQOS_MARK_SKBPRIO + __u32 old_priority = skb->priority; +#endif /* for offloaded checksums cleanup checksum before fragmentation */ if (skb->ip_summed == CHECKSUM_PARTIAL && @@ -648,6 +663,9 @@ ip_send_check(iph); } +#ifdef CONFIG_INTEL_IPQOS_MARK_SKBPRIO + skb->priority = old_priority; +#endif err = output(net, sk, skb); if (!err) @@ -785,6 +803,9 @@ ip_send_check(iph); +#ifdef CONFIG_INTEL_IPQOS_MARK_SKBPRIO + skb2->priority = old_priority; +#endif err = output(net, sk, skb2); if (err) goto fail; @@ -1606,7 +1627,8 @@ RT_SCOPE_UNIVERSE, ip_hdr(skb)->protocol, ip_reply_arg_flowi_flags(arg), daddr, saddr, - tcp_hdr(skb)->source, tcp_hdr(skb)->dest); + tcp_hdr(skb)->source, tcp_hdr(skb)->dest, + arg->uid); security_skb_classify_flow(skb, flowi4_to_flowi(&fl4)); rt = ip_route_output_key(net, &fl4); if (IS_ERR(rt))