summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-01-07 12:45:08 +0200
committerDavid S. Miller <davem@davemloft.net>2018-01-07 21:29:40 -0500
commit44c9f2f206f880c959fa4b43618e3f7fe2cd6157 (patch)
treea0404bca9a5b7f5e5c996a0fbf5e519760281f9f /net
parent14c5206c2d02495de995210d104cb7f084d82e2b (diff)
downloadlinux-44c9f2f206f880c959fa4b43618e3f7fe2cd6157.tar.gz
linux-44c9f2f206f880c959fa4b43618e3f7fe2cd6157.tar.bz2
linux-44c9f2f206f880c959fa4b43618e3f7fe2cd6157.zip
ipv6: Check nexthop flags in route dump instead of carrier
Similar to previous patch, there is no need to check for the carrier of the nexthop device when dumping the route and we can instead check for the presence of the RTNH_F_LINKDOWN flag. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ab0eed43ed97..f980f904d6ea 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4039,7 +4039,7 @@ static size_t rt6_nlmsg_size(struct rt6_info *rt)
static int rt6_nexthop_info(struct sk_buff *skb, struct rt6_info *rt,
unsigned int *flags, bool skip_oif)
{
- if (!netif_running(rt->dst.dev) || !netif_carrier_ok(rt->dst.dev)) {
+ if (rt->rt6i_nh_flags & RTNH_F_LINKDOWN) {
*flags |= RTNH_F_LINKDOWN;
if (rt->rt6i_idev->cnf.ignore_routes_with_linkdown)
*flags |= RTNH_F_DEAD;