aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBenjamin LaHaise <bcrl@kvack.org>2012-03-27 11:55:32 -0400
committerDavid S. Miller <davem@davemloft.net>2012-03-28 04:45:37 -0400
commit4e7b2f1454382b220f792a7fbcbebd0985187161 (patch)
treec0161155b8d2dc170ee3727c4b4cd99302f41379 /net
parent2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 (diff)
net/ipv4: fix IPv4 multicast over network namespaces
When using multicast over a local bridge feeding a number of LXC guests using veth, the LXC guests are unable to get a response from other guests when pinging 224.0.0.1. Multicast packets did not appear to be getting delivered to the network namespaces of the guest hosts, and further inspection showed that the incoming route was pointing to the loopback device of the host, not the guest. This lead to the wrong network namespace being picked up by sockets (like ICMP). Fix this by using the correct network namespace when creating the inbound route entry. Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 12ccf880eb8..3b110a46362 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2042,7 +2042,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
2042 if (err < 0) 2042 if (err < 0)
2043 goto e_err; 2043 goto e_err;
2044 } 2044 }
2045 rth = rt_dst_alloc(init_net.loopback_dev, 2045 rth = rt_dst_alloc(dev_net(dev)->loopback_dev,
2046 IN_DEV_CONF_GET(in_dev, NOPOLICY), false); 2046 IN_DEV_CONF_GET(in_dev, NOPOLICY), false);
2047 if (!rth) 2047 if (!rth)
2048 goto e_nobufs; 2048 goto e_nobufs;