From: ebiederm@xmission.com (Eric W. Biederman)
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH] netns: Only route multicast trafic in init_net
Date: Fri, 11 Jul 2008 13:02:04 -0700 [thread overview]
Message-ID: <m1od54dwar.fsf@frodo.ebiederm.org> (raw)
Currently the code to only support multicast traffic in the initial
namespace is incomplete, and receiving a multicast packet causes in a
network namespace causes us to take an initialized lock. Resulting
in a nasty oops. Ouch!
So until we have network namespace support in igmp.c simply disable
multicast packet reception.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
net/ipv4/igmp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 2769dc4..12201ac 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2277,6 +2277,9 @@ int ip_check_mc(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u16 p
struct ip_sf_list *psf;
int rv = 0;
+ if (dev_net(in_dev->dev) != &init_net)
+ return rv;
+
read_lock(&in_dev->mc_list_lock);
for (im=in_dev->mc_list; im; im=im->next) {
if (im->multiaddr == mc_addr)
--
1.5.3.rc6.17.g1911
next reply other threads:[~2008-07-11 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 20:02 Eric W. Biederman [this message]
2008-07-11 20:31 ` [PATCH] netns: Teach the igmp code to handle multiple namespaces Eric W. Biederman
2008-07-12 6:58 ` Denis V. Lunev
2008-07-15 5:21 ` David Miller
2008-07-15 5:25 ` [PATCH] netns: Only route multicast trafic in init_net David Miller
2008-07-15 5:59 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1od54dwar.fsf@frodo.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).