mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:30:52 +07:00
ipv6: Set nexthop flags during route creation
It is valid to install routes with a nexthop device that does not have a carrier, so we need to make sure they're marked accordingly. As explained in the previous patch, host and anycast routes are never marked with the 'linkdown' flag. Note that reject routes are unaffected, as these use the loopback device which always has a carrier. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
27c6fa73f9
commit
5609b80a37
@ -2746,6 +2746,9 @@ static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg,
|
||||
rt->rt6i_flags = cfg->fc_flags;
|
||||
|
||||
install_route:
|
||||
if (!(rt->rt6i_flags & (RTF_LOCAL | RTF_ANYCAST)) &&
|
||||
!netif_carrier_ok(dev))
|
||||
rt->rt6i_nh_flags |= RTNH_F_LINKDOWN;
|
||||
rt->dst.dev = dev;
|
||||
rt->rt6i_idev = idev;
|
||||
rt->rt6i_table = table;
|
||||
|
Loading…
Reference in New Issue
Block a user