aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5a3e87e4b18f..41b165ffb369 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2187,8 +2187,9 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2187#endif 2187#endif
2188 NLA_PUT_U32(skb, RTA_IIF, iif); 2188 NLA_PUT_U32(skb, RTA_IIF, iif);
2189 } else if (dst) { 2189 } else if (dst) {
2190 struct inet6_dev *idev = ip6_dst_idev(&rt->u.dst);
2190 struct in6_addr saddr_buf; 2191 struct in6_addr saddr_buf;
2191 if (ipv6_dev_get_saddr(ip6_dst_idev(&rt->u.dst)->dev, 2192 if (ipv6_dev_get_saddr(idev ? idev->dev : NULL,
2192 dst, 0, &saddr_buf) == 0) 2193 dst, 0, &saddr_buf) == 0)
2193 NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); 2194 NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
2194 } 2195 }