From: "Linus Lüssing" <linus.luessing@web.de>
To: Stephen Hemminger <shemminger@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
bridge@lists.linux-foundation.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Linus Lüssing" <linus.luessing@web.de>
Subject: [PATCH 5/5] bridge: Allow mcast snooping for transient link local addresses too
Date: Wed, 16 Feb 2011 00:19:21 +0100 [thread overview]
Message-ID: <1297811961-19249-6-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1297811961-19249-1-git-send-email-linus.luessing@web.de>
Currently the multicast bridge snooping support is not active for
link local multicast. I assume this has been done to leave
important multicast data untouched, like IPv6 Neighborhood Discovery.
In larger, bridged, local networks it could however be desirable to
optimize for instance local multicast audio/video streaming too.
With the transient flag in IPv6 multicast addresses we have an easy
way to optimize such multimedia traffic without tempering with the
high priority multicast data from well-known addresses.
This patch alters the multicast bridge snooping for IPv6, to take
effect for transient multicast addresses instead of non-link-local
addresses.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
net/bridge/br_multicast.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index e8fdaab..b5eb28a 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -37,10 +37,9 @@
rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-static inline int ipv6_is_local_multicast(const struct in6_addr *addr)
+static inline int ipv6_is_transient_multicast(const struct in6_addr *addr)
{
- if (ipv6_addr_is_multicast(addr) &&
- IPV6_ADDR_MC_SCOPE(addr) <= IPV6_ADDR_SCOPE_LINKLOCAL)
+ if (ipv6_addr_is_multicast(addr) && IPV6_ADDR_MC_FLAG_TRANSIENT(addr))
return 1;
return 0;
}
@@ -781,7 +780,7 @@ static int br_ip6_multicast_add_group(struct net_bridge *br,
{
struct br_ip br_group;
- if (ipv6_is_local_multicast(group))
+ if (!ipv6_is_transient_multicast(group))
return 0;
ipv6_addr_copy(&br_group.u.ip6, group);
@@ -1342,7 +1341,7 @@ static void br_ip6_multicast_leave_group(struct net_bridge *br,
{
struct br_ip br_group;
- if (ipv6_is_local_multicast(group))
+ if (!ipv6_is_transient_multicast(group))
return;
ipv6_addr_copy(&br_group.u.ip6, group);
--
1.7.2.3
next prev parent reply other threads:[~2011-02-15 23:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 23:19 Multicast snooping fixes and suggestions Linus Lüssing
2011-02-15 23:19 ` [PATCH 1/5] bridge: Fix IPv6 multicast snooping by storing correct protocol type Linus Lüssing
2011-02-15 23:19 ` [PATCH 2/5] bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report Linus Lüssing
2011-02-15 23:19 ` [PATCH 3/5] bridge: Add missing ntohs()s for MLDv2 report parsing Linus Lüssing
2011-02-15 23:19 ` [PATCH 4/5] ipv6: Add IPv6 multicast address flag defines Linus Lüssing
2011-02-15 23:19 ` Linus Lüssing [this message]
2011-02-15 23:41 ` Multicast snooping fixes and suggestions Stephen Hemminger
2011-02-17 18:17 ` Linus Lüssing
2011-02-17 18:17 ` [PATCH 1/2] bridge: Fix MLD queries' ethernet source address Linus Lüssing
2011-02-22 18:08 ` David Miller
2011-02-17 18:17 ` [PATCH 2/2] bridge: Use IPv6 link-local address for multicast listener queries Linus Lüssing
2011-02-22 18:08 ` David Miller
2011-02-22 18:08 ` Multicast snooping fixes and suggestions David Miller
2011-02-24 3:16 ` H. Peter Anvin
2011-02-24 4:04 ` Herbert Xu
2011-02-24 4:46 ` H. Peter Anvin
2011-02-24 5:42 ` Herbert Xu
2011-02-24 5:57 ` H. Peter Anvin
2011-02-24 6:37 ` Stephen Hemminger
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=1297811961-19249-6-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.de \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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).