|
@@ -2282,14 +2282,14 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
/* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */
|
|
/* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */
|
|
- dev_out = ip_dev_find(oldflp->fl4_src);
|
|
|
|
|
|
+ dev_out = ip_dev_find(&init_net, oldflp->fl4_src);
|
|
if (dev_out == NULL)
|
|
if (dev_out == NULL)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
/* I removed check for oif == dev_out->oif here.
|
|
/* I removed check for oif == dev_out->oif here.
|
|
It was wrong for two reasons:
|
|
It was wrong for two reasons:
|
|
- 1. ip_dev_find(saddr) can return wrong iface, if saddr is
|
|
|
|
- assigned to multiple interfaces.
|
|
|
|
|
|
+ 1. ip_dev_find(net, saddr) can return wrong iface, if saddr
|
|
|
|
+ is assigned to multiple interfaces.
|
|
2. Moreover, we are allowed to send packets with saddr
|
|
2. Moreover, we are allowed to send packets with saddr
|
|
of another iface. --ANK
|
|
of another iface. --ANK
|
|
*/
|
|
*/
|