From: Corey Mutter <crm-netdev@the-machine.mutternet.com>
To: yoshfuji@linux-ipv6.org
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/1] Reverse sense of promisc tests in ip6_mc_input
Date: Sat, 12 May 2007 18:51:35 -0400 [thread overview]
Message-ID: <20070512225135.GA1143@nc.rr.com> (raw)
From: Corey Mutter <crm-netdev@mutternet.com>
Reverse the sense of the promiscuous-mode tests in ip6_mc_input().
Signed-off-by: Corey Mutter <crm-netdev@mutternet.com>
---
I had been suspicious of this code for a while, but just assumed I must
have been missing something. However, I did some tests and, sure enough,
I can open a socket and it will see IPv6 multicast packets come in, then
the packets will stop coming in when I turn on IFF_ALLMULTI on the
interface.
In my tests, this change works more like I'd expect; I can open a
socket, and it doesn't see any multicast packets (unless I join a group
or something) until after I turn on IFF_ALLMULTI.
--- linux-2.6.21.1/net/ipv6/ip6_input.c 2007-04-27 17:49:26.000000000 -0400
+++ linux/net/ipv6/ip6_input.c 2007-05-12 18:19:09.597750000 -0400
@@ -235,7 +235,7 @@ int ip6_mc_input(struct sk_buff *skb)
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);
hdr = skb->nh.ipv6h;
- deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) ||
+ deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) ||
ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
/*
next reply other threads:[~2007-05-12 23:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 22:51 Corey Mutter [this message]
2007-05-13 0:21 ` [PATCH 1/1] Reverse sense of promisc tests in ip6_mc_input David Stevens
2007-05-14 10:00 ` David Miller
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=20070512225135.GA1143@nc.rr.com \
--to=crm-netdev@the-machine.mutternet.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.