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/fib6_rules.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/fib6_rules.c')
-rw-r--r-- | net/ipv6/fib6_rules.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 8d05527524e3..f5de3f9dc692 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -93,7 +93,8 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | |||
93 | if (flags & RT6_LOOKUP_F_SRCPREF_COA) | 93 | if (flags & RT6_LOOKUP_F_SRCPREF_COA) |
94 | srcprefs |= IPV6_PREFER_SRC_COA; | 94 | srcprefs |= IPV6_PREFER_SRC_COA; |
95 | 95 | ||
96 | if (ipv6_dev_get_saddr(ip6_dst_idev(&rt->u.dst)->dev, | 96 | if (ipv6_dev_get_saddr(net, |
97 | ip6_dst_idev(&rt->u.dst)->dev, | ||
97 | &flp->fl6_dst, srcprefs, | 98 | &flp->fl6_dst, srcprefs, |
98 | &saddr)) | 99 | &saddr)) |
99 | goto again; | 100 | goto again; |