diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-23 01:04:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:04 -0500 |
commit | 1ab352768fc73838b062776ca5d1add3876a019f (patch) | |
tree | b30bd7744e30e90b6db01b71a5c8b86140538255 /net/ipv4/route.c | |
parent | 010278ec4cdf404aefc0bbd5e7406674fec95286 (diff) |
[NETNS]: Add namespace parameter to ip_dev_find.
in_dev_find() need a namespace to pass it to fib_get_table(), so add
an argument.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4313255e5a14..674575b622ad 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2282,14 +2282,14 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) | |||
2282 | goto out; | 2282 | goto out; |
2283 | 2283 | ||
2284 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ | 2284 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ |
2285 | dev_out = ip_dev_find(oldflp->fl4_src); | 2285 | dev_out = ip_dev_find(&init_net, oldflp->fl4_src); |
2286 | if (dev_out == NULL) | 2286 | if (dev_out == NULL) |
2287 | goto out; | 2287 | goto out; |
2288 | 2288 | ||
2289 | /* I removed check for oif == dev_out->oif here. | 2289 | /* I removed check for oif == dev_out->oif here. |
2290 | It was wrong for two reasons: | 2290 | It was wrong for two reasons: |
2291 | 1. ip_dev_find(saddr) can return wrong iface, if saddr is | 2291 | 1. ip_dev_find(net, saddr) can return wrong iface, if saddr |
2292 | assigned to multiple interfaces. | 2292 | is assigned to multiple interfaces. |
2293 | 2. Moreover, we are allowed to send packets with saddr | 2293 | 2. Moreover, we are allowed to send packets with saddr |
2294 | of another iface. --ANK | 2294 | of another iface. --ANK |
2295 | */ | 2295 | */ |