Commit cea45e20 authored by Andy Gospodarek's avatar Andy Gospodarek Committed by David S. Miller

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: default avatarAndy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: default avatarDinesh Dutt <ddutt@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e3d04fd
...@@ -2887,6 +2887,8 @@ static int rt6_fill_node(struct net *net, ...@@ -2887,6 +2887,8 @@ static int rt6_fill_node(struct net *net,
else else
rtm->rtm_type = RTN_UNICAST; rtm->rtm_type = RTN_UNICAST;
rtm->rtm_flags = 0; rtm->rtm_flags = 0;
if (!netif_carrier_ok(rt->dst.dev))
rtm->rtm_flags |= RTNH_F_LINKDOWN;
rtm->rtm_scope = RT_SCOPE_UNIVERSE; rtm->rtm_scope = RT_SCOPE_UNIVERSE;
rtm->rtm_protocol = rt->rt6i_protocol; rtm->rtm_protocol = rt->rt6i_protocol;
if (rt->rt6i_flags & RTF_DYNAMIC) if (rt->rt6i_flags & RTF_DYNAMIC)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment