diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4284ceef7945..7547944ea9bf 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1346,9 +1346,9 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw, | |||
1346 | return; | 1346 | return; |
1347 | 1347 | ||
1348 | net = dev_net(dev); | 1348 | net = dev_net(dev); |
1349 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) | 1349 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) || |
1350 | || ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) | 1350 | ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) || |
1351 | || ipv4_is_zeronet(new_gw)) | 1351 | ipv4_is_zeronet(new_gw)) |
1352 | goto reject_redirect; | 1352 | goto reject_redirect; |
1353 | 1353 | ||
1354 | if (!rt_caching(net)) | 1354 | if (!rt_caching(net)) |
@@ -2311,10 +2311,11 @@ skip_cache: | |||
2311 | ip_hdr(skb)->protocol); | 2311 | ip_hdr(skb)->protocol); |
2312 | if (our | 2312 | if (our |
2313 | #ifdef CONFIG_IP_MROUTE | 2313 | #ifdef CONFIG_IP_MROUTE |
2314 | || (!ipv4_is_local_multicast(daddr) && | 2314 | || |
2315 | IN_DEV_MFORWARD(in_dev)) | 2315 | (!ipv4_is_local_multicast(daddr) && |
2316 | IN_DEV_MFORWARD(in_dev)) | ||
2316 | #endif | 2317 | #endif |
2317 | ) { | 2318 | ) { |
2318 | rcu_read_unlock(); | 2319 | rcu_read_unlock(); |
2319 | return ip_route_input_mc(skb, daddr, saddr, | 2320 | return ip_route_input_mc(skb, daddr, saddr, |
2320 | tos, dev, our); | 2321 | tos, dev, our); |
@@ -2511,9 +2512,9 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, | |||
2511 | of another iface. --ANK | 2512 | of another iface. --ANK |
2512 | */ | 2513 | */ |
2513 | 2514 | ||
2514 | if (oldflp->oif == 0 | 2515 | if (oldflp->oif == 0 && |
2515 | && (ipv4_is_multicast(oldflp->fl4_dst) || | 2516 | (ipv4_is_multicast(oldflp->fl4_dst) || |
2516 | oldflp->fl4_dst == htonl(0xFFFFFFFF))) { | 2517 | oldflp->fl4_dst == htonl(0xFFFFFFFF))) { |
2517 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ | 2518 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ |
2518 | dev_out = ip_dev_find(net, oldflp->fl4_src); | 2519 | dev_out = ip_dev_find(net, oldflp->fl4_src); |
2519 | if (dev_out == NULL) | 2520 | if (dev_out == NULL) |