--- zzzz-none-000/linux-4.1.38/include/net/ipv6.h 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/include/net/ipv6.h 2020-11-25 10:06:48.000000000 +0000 @@ -310,11 +310,22 @@ static inline bool ipv6_accept_ra(struct inet6_dev *idev) { +#if defined(CONFIG_BCM_KF_IP) + /* WAN interface needs to act like a host. */ + if (((idev->cnf.forwarding) && + (!(idev->dev->priv_flags & IFF_WANDEV) || + ((idev->dev->priv_flags & IFF_WANDEV) && + netdev_path_is_root(idev->dev)))) + && (idev->cnf.accept_ra < 2)) + return 0; + return idev->cnf.accept_ra; +#else /* If forwarding is enabled, RA are not accepted unless the special * hybrid mode (accept_ra=2) is enabled. */ return idev->cnf.forwarding ? idev->cnf.accept_ra == 2 : idev->cnf.accept_ra; +#endif } #if IS_ENABLED(CONFIG_IPV6)