--- zzzz-none-000/linux-4.1.52/net/ipv4/ip_forward.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/ipv4/ip_forward.c 2022-03-02 11:37:13.000000000 +0000 @@ -139,6 +139,15 @@ skb->priority = rt_tos2priority(iph->tos); +#if defined(CONFIG_BCM_KF_WANDEV) +#if !defined(CONFIG_BCM_WAN_2_WAN_FWD_ENABLED) + /* Never forward a packet from a WAN intf to the other WAN intf */ + if( (skb->dev) && (rt->dst.dev) && + ((skb->dev->priv_flags & rt->dst.dev->priv_flags) & IFF_WANDEV) ) + goto drop; +#endif +#endif + return NF_HOOK(NFPROTO_IPV4, NF_INET_FORWARD, NULL, skb, skb->dev, rt->dst.dev, ip_forward_finish);