diff options
-rw-r--r-- | net/ipv6/route.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2a4c8d48977f..412fad809a3b 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2399,10 +2399,12 @@ static int rt6_fill_node(struct net *net, | |||
2399 | rtm->rtm_protocol = rt->rt6i_protocol; | 2399 | rtm->rtm_protocol = rt->rt6i_protocol; |
2400 | if (rt->rt6i_flags & RTF_DYNAMIC) | 2400 | if (rt->rt6i_flags & RTF_DYNAMIC) |
2401 | rtm->rtm_protocol = RTPROT_REDIRECT; | 2401 | rtm->rtm_protocol = RTPROT_REDIRECT; |
2402 | else if (rt->rt6i_flags & RTF_ADDRCONF) | 2402 | else if (rt->rt6i_flags & RTF_ADDRCONF) { |
2403 | rtm->rtm_protocol = RTPROT_KERNEL; | 2403 | if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO)) |
2404 | else if (rt->rt6i_flags & RTF_DEFAULT) | 2404 | rtm->rtm_protocol = RTPROT_RA; |
2405 | rtm->rtm_protocol = RTPROT_RA; | 2405 | else |
2406 | rtm->rtm_protocol = RTPROT_KERNEL; | ||
2407 | } | ||
2406 | 2408 | ||
2407 | if (rt->rt6i_flags & RTF_CACHE) | 2409 | if (rt->rt6i_flags & RTF_CACHE) |
2408 | rtm->rtm_flags |= RTM_F_CLONED; | 2410 | rtm->rtm_flags |= RTM_F_CLONED; |