From: Vlad Yasevich <vyasevic@redhat.com>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org,
Stephen Hemminger <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Patch net] bridge: add missing vid to br_mdb_get()
Date: Thu, 07 Mar 2013 10:18:20 -0500 [thread overview]
Message-ID: <5138AFBC.4070303@redhat.com> (raw)
In-Reply-To: <1362661533-29192-1-git-send-email-amwang@redhat.com>
On 03/07/2013 08:05 AM, Cong Wang wrote:
> From: Cong Wang <amwang@redhat.com>
>
> Obviously, vid should be considered when searching for multicast
> group.
>
> Cc: Vlad Yasevich <vyasevic@redhat.com>
Don't know how I missied that...
Acked-by: Vlad Yasevich <vyasevich@redhat.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> ---
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index d5f1d3f..314c73e 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -66,7 +66,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
> goto out;
> }
>
> - mdst = br_mdb_get(br, skb);
> + mdst = br_mdb_get(br, skb, vid);
> if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
> br_multicast_deliver(mdst, skb);
> else
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index 4803301..828e2bc 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -97,7 +97,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
> if (is_broadcast_ether_addr(dest))
> skb2 = skb;
> else if (is_multicast_ether_addr(dest)) {
> - mdst = br_mdb_get(br, skb);
> + mdst = br_mdb_get(br, skb, vid);
> if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) {
> if ((mdst && mdst->mglist) ||
> br_multicast_is_router(br))
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index 10e6fce..923fbea 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -132,7 +132,7 @@ static struct net_bridge_mdb_entry *br_mdb_ip6_get(
> #endif
>
> struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
> - struct sk_buff *skb)
> + struct sk_buff *skb, u16 vid)
> {
> struct net_bridge_mdb_htable *mdb = rcu_dereference(br->mdb);
> struct br_ip ip;
> @@ -144,6 +144,7 @@ struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
> return NULL;
>
> ip.proto = skb->protocol;
> + ip.vid = vid;
>
> switch (skb->protocol) {
> case htons(ETH_P_IP):
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index 6d314c4..3cbf5be 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -442,7 +442,7 @@ extern int br_multicast_rcv(struct net_bridge *br,
> struct net_bridge_port *port,
> struct sk_buff *skb);
> extern struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
> - struct sk_buff *skb);
> + struct sk_buff *skb, u16 vid);
> extern void br_multicast_add_port(struct net_bridge_port *port);
> extern void br_multicast_del_port(struct net_bridge_port *port);
> extern void br_multicast_enable_port(struct net_bridge_port *port);
> @@ -504,7 +504,7 @@ static inline int br_multicast_rcv(struct net_bridge *br,
> }
>
> static inline struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
> - struct sk_buff *skb)
> + struct sk_buff *skb, u16 vid)
> {
> return NULL;
> }
>
next prev parent reply other threads:[~2013-03-07 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 13:05 [Patch net] bridge: add missing vid to br_mdb_get() Cong Wang
2013-03-07 15:18 ` Vlad Yasevich [this message]
2013-03-07 21:34 ` 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=5138AFBC.4070303@redhat.com \
--to=vyasevic@redhat.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--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 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).