Skip to content

Commit cea45e2

Browse files
gospodavem330
authored andcommitted
net: track link status of ipv6 nexthops
Add support to track current link status of ipv6 nexthops to match recent changes that added support for ipv4 nexthops. This takes a simple approach to track linkdown status for next-hops and simply checks the dev for the dst entry and sets proper flags that to be used in the netlink message. v2: drop use of rt6i_nhflags since it is not needed right now Signed-off-by: Andy Gospodarek <[email protected]> Signed-off-by: Dinesh Dutt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8e3d04f commit cea45e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv6/route.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,6 +2887,8 @@ static int rt6_fill_node(struct net *net,
28872887
else
28882888
rtm->rtm_type = RTN_UNICAST;
28892889
rtm->rtm_flags = 0;
2890+
if (!netif_carrier_ok(rt->dst.dev))
2891+
rtm->rtm_flags |= RTNH_F_LINKDOWN;
28902892
rtm->rtm_scope = RT_SCOPE_UNIVERSE;
28912893
rtm->rtm_protocol = rt->rt6i_protocol;
28922894
if (rt->rt6i_flags & RTF_DYNAMIC)

0 commit comments

Comments
 (0)