--- zzzz-none-000/linux-4.19.183/net/ipv4/ip_forward.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/net/ipv4/ip_forward.c 2023-06-28 08:54:21.000000000 +0000 @@ -40,6 +40,8 @@ #include #include +#include + static bool ip_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu) { if (skb->len <= mtu) @@ -73,6 +75,9 @@ ip_forward_options(skb); skb->tstamp = 0; + + avm_pa_mark_routed(skb); + return dst_output(net, sk, skb); } @@ -147,6 +152,11 @@ if (net->ipv4.sysctl_ip_fwd_update_priority) skb->priority = rt_tos2priority(iph->tos); +#if defined(CONFIG_BCM_KF_MAP) && IS_ENABLED(CONFIG_BCM_MAP) + if (skbuff_bcm_ext_map_get(skb, map_forward) != MAP_FORWARD_NONE) + return ip_forward_finish(net, NULL, skb); +#endif + return NF_HOOK(NFPROTO_IPV4, NF_INET_FORWARD, net, NULL, skb, skb->dev, rt->dst.dev, ip_forward_finish);