From: "Linus Lüssing" <linus.luessing@web.de>
To: netdev@vger.kernel.org
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
"Adam Baker" <linux@baker-net.org.uk>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Linus Lüssing" <linus.luessing@web.de>,
"David S. Miller" <davem@davemloft.net>,
"Cong Wang" <amwang@redhat.com>
Subject: [Bridge] [PATCH net-next 1/2] bridge: prevent flooding IPv6 packets that do not have a listener
Date: Wed, 4 Sep 2013 02:13:38 +0200 [thread overview]
Message-ID: <1378253619-23918-2-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1378253619-23918-1-git-send-email-linus.luessing@web.de>
Currently if there is no listener for a certain group then IPv6 packets
for that group are flooded on all ports, even though there might be no
host and router interested in it on a port.
With this commit they are only forwarded to ports with a multicast
router.
Just like commit bd4265fe36 ("bridge: Only flood unregistered groups
to routers") did for IPv4, let's do the same for IPv6 with the same
reasoning.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
net/bridge/br_multicast.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index bbcb435..662ba7b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1547,8 +1547,14 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
* - MLD has always Router Alert hop-by-hop option
* - But we do not support jumbrograms.
*/
- if (ip6h->version != 6 ||
- ip6h->nexthdr != IPPROTO_HOPOPTS ||
+ if (ip6h->version != 6)
+ return 0;
+
+ /* Prevent flooding this packet if there is no listener present */
+ if (ipv6_is_transient_multicast(&ip6h->daddr))
+ BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
+
+ if (ip6h->nexthdr != IPPROTO_HOPOPTS ||
ip6h->payload_len == 0)
return 0;
--
1.7.10.4
WARNING: multiple messages have this Message-ID (diff)
From: "Linus Lüssing" <linus.luessing@web.de>
To: netdev@vger.kernel.org
Cc: bridge@lists.linux-foundation.org,
"Stephen Hemminger" <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org,
"Herbert Xu" <herbert@gondor.hengli.com.au>,
"Cong Wang" <amwang@redhat.com>,
"Adam Baker" <linux@baker-net.org.uk>,
"Linus Lüssing" <linus.luessing@web.de>
Subject: [PATCH net-next 1/2] bridge: prevent flooding IPv6 packets that do not have a listener
Date: Wed, 4 Sep 2013 02:13:38 +0200 [thread overview]
Message-ID: <1378253619-23918-2-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1378253619-23918-1-git-send-email-linus.luessing@web.de>
Currently if there is no listener for a certain group then IPv6 packets
for that group are flooded on all ports, even though there might be no
host and router interested in it on a port.
With this commit they are only forwarded to ports with a multicast
router.
Just like commit bd4265fe36 ("bridge: Only flood unregistered groups
to routers") did for IPv4, let's do the same for IPv6 with the same
reasoning.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
net/bridge/br_multicast.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index bbcb435..662ba7b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1547,8 +1547,14 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
* - MLD has always Router Alert hop-by-hop option
* - But we do not support jumbrograms.
*/
- if (ip6h->version != 6 ||
- ip6h->nexthdr != IPPROTO_HOPOPTS ||
+ if (ip6h->version != 6)
+ return 0;
+
+ /* Prevent flooding this packet if there is no listener present */
+ if (ipv6_is_transient_multicast(&ip6h->daddr))
+ BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
+
+ if (ip6h->nexthdr != IPPROTO_HOPOPTS ||
ip6h->payload_len == 0)
return 0;
--
1.7.10.4
WARNING: multiple messages have this Message-ID (diff)
From: "Linus Lüssing" <linus.luessing@web.de>
To: netdev@vger.kernel.org
Cc: bridge@lists.linux-foundation.org,
"Stephen Hemminger" <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Cong Wang" <amwang@redhat.com>,
"Adam Baker" <linux@baker-net.org.uk>,
"Linus Lüssing" <linus.luessing@web.de>
Subject: [PATCH net-next 1/2] bridge: prevent flooding IPv6 packets that do not have a listener
Date: Wed, 4 Sep 2013 02:13:38 +0200 [thread overview]
Message-ID: <1378253619-23918-2-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1378253619-23918-1-git-send-email-linus.luessing@web.de>
Currently if there is no listener for a certain group then IPv6 packets
for that group are flooded on all ports, even though there might be no
host and router interested in it on a port.
With this commit they are only forwarded to ports with a multicast
router.
Just like commit bd4265fe36 ("bridge: Only flood unregistered groups
to routers") did for IPv4, let's do the same for IPv6 with the same
reasoning.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
net/bridge/br_multicast.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index bbcb435..662ba7b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1547,8 +1547,14 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
* - MLD has always Router Alert hop-by-hop option
* - But we do not support jumbrograms.
*/
- if (ip6h->version != 6 ||
- ip6h->nexthdr != IPPROTO_HOPOPTS ||
+ if (ip6h->version != 6)
+ return 0;
+
+ /* Prevent flooding this packet if there is no listener present */
+ if (ipv6_is_transient_multicast(&ip6h->daddr))
+ BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
+
+ if (ip6h->nexthdr != IPPROTO_HOPOPTS ||
ip6h->payload_len == 0)
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2013-09-04 0:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 0:13 [Bridge] bride: IPv6 multicast snooping enhancements Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing [this message]
2013-09-04 0:13 ` [PATCH net-next 1/2] bridge: prevent flooding IPv6 packets that do not have a listener Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing
2013-09-04 0:13 ` [Bridge] [PATCH net-next 2/2] bridge: apply multicast snooping to IPv6 link-local, too Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing
2013-09-04 0:13 ` Linus Lüssing
2013-09-05 16:36 ` [Bridge] bride: IPv6 multicast snooping enhancements David Miller
2013-09-05 16:36 ` David Miller
2013-09-05 16:36 ` David Miller
2015-02-10 8:44 ` [Bridge] " Vasily Averin
2015-02-10 8:44 ` Vasily Averin
2015-02-10 8:44 ` Vasily Averin
2015-02-10 11:44 ` [Bridge] " Linus Lüssing
2015-02-10 11:44 ` Linus Lüssing
2015-02-10 11:44 ` Linus Lüssing
2015-02-10 13:59 ` [Bridge] " Vasily Averin
2015-02-10 13:59 ` Vasily Averin
2015-02-10 13:59 ` Vasily Averin
2015-02-12 11:41 ` [Bridge] " Linus Lüssing
2015-02-12 11:41 ` Linus Lüssing
2015-02-12 12:01 ` [Bridge] " Vasily Averin
2015-02-12 12:01 ` Vasily Averin
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=1378253619-23918-2-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.de \
--cc=amwang@redhat.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@baker-net.org.uk \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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.