diff options
author | Benjamin LaHaise <bcrl@kvack.org> | 2012-03-27 15:55:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-28 04:45:37 -0400 |
commit | 4e7b2f1454382b220f792a7fbcbebd0985187161 (patch) | |
tree | c0161155b8d2dc170ee3727c4b4cd99302f41379 /net | |
parent | 2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 (diff) | |
download | blackbird-op-linux-4e7b2f1454382b220f792a7fbcbebd0985187161.tar.gz blackbird-op-linux-4e7b2f1454382b220f792a7fbcbebd0985187161.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 12ccf880eb88..3b110a46362c 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, if (err < 0) goto e_err; } - rth = rt_dst_alloc(init_net.loopback_dev, + rth = rt_dst_alloc(dev_net(dev)->loopback_dev, IN_DEV_CONF_GET(in_dev, NOPOLICY), false); if (!rth) goto e_nobufs; |