summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndy Gospodarek <gospo@cumulusnetworks.com>2015-08-13 16:39:00 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-14 06:27:18 +0200
commitcea45e208d700e9d633a636384a49f19cda979b7 (patch)
tree7514f98b95676e6b423f150158754aa2b1f43262 /net
parentcxgb4: Add MPS tracing support (diff)
downloadlinux-cea45e208d700e9d633a636384a49f19cda979b7.tar.xz
linux-cea45e208d700e9d633a636384a49f19cda979b7.zip
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 <gospo@cumulusnetworks.com> Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv6/route.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c0fa61eba8f2..370f72785385 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2887,6 +2887,8 @@ static int rt6_fill_node(struct net *net,
else
rtm->rtm_type = RTN_UNICAST;
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_protocol = rt->rt6i_protocol;
if (rt->rt6i_flags & RTF_DYNAMIC)