diff options
author | Brian Haley <brian.haley@hp.com> | 2008-08-14 18:33:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-14 18:33:21 -0400 |
commit | 191cd582500f49b32a63040fedeebb0168c720af (patch) | |
tree | 173ce9682d77798c6e4ca7e14af57ea2f46c55b8 /net/ipv6/addrconf.c | |
parent | 0eb8b1fe9238ca4c1797e4c105d5790abda1726f (diff) |
netns: Add network namespace argument to rt6_fill_node() and ipv6_dev_get_saddr()
ipv6_dev_get_saddr() blindly de-references dst_dev to get the network
namespace, but some callers might pass NULL. Change callers to pass a
namespace pointer instead.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a7842c54f58a..e2d3b7580b76 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1106,13 +1106,12 @@ out: | |||
1106 | return ret; | 1106 | return ret; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | int ipv6_dev_get_saddr(struct net_device *dst_dev, | 1109 | int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, |
1110 | const struct in6_addr *daddr, unsigned int prefs, | 1110 | const struct in6_addr *daddr, unsigned int prefs, |
1111 | struct in6_addr *saddr) | 1111 | struct in6_addr *saddr) |
1112 | { | 1112 | { |
1113 | struct ipv6_saddr_score scores[2], | 1113 | struct ipv6_saddr_score scores[2], |
1114 | *score = &scores[0], *hiscore = &scores[1]; | 1114 | *score = &scores[0], *hiscore = &scores[1]; |
1115 | struct net *net = dev_net(dst_dev); | ||
1116 | struct ipv6_saddr_dst dst; | 1115 | struct ipv6_saddr_dst dst; |
1117 | struct net_device *dev; | 1116 | struct net_device *dev; |
1118 | int dst_type; | 1117 | int dst_type; |