diff mbox

[net-next] macvlan: broadcast addr should be part of mc_filter

Message ID 1360288977.28557.77.camel@edumazet-glaptop
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Feb. 8, 2013, 2:02 a.m. UTC
From: Eric Dumazet <edumazet@google.com>

commit cd431e738509e (macvlan: add multicast filter) forgot
the broadcast case.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Maciej Żenczykowski <maze@google.com>
---
 drivers/net/macvlan.c |    3 +++
 1 file changed, 3 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Maciej Żenczykowski Feb. 8, 2013, 2:05 a.m. UTC | #1
SIgned-off-by: Maciej Żenczykowski <maze@google.com>

On Thu, Feb 7, 2013 at 6:02 PM, Eric Dumazet <erdnetdev@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> commit cd431e738509e (macvlan: add multicast filter) forgot
> the broadcast case.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Maciej Żenczykowski <maze@google.com>
> ---
>  drivers/net/macvlan.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
> index f494da8..ce7c926 100644
> --- a/drivers/net/macvlan.c
> +++ b/drivers/net/macvlan.c
> @@ -426,6 +426,9 @@ static void macvlan_set_mac_lists(struct net_device *dev)
>                 netdev_for_each_mc_addr(ha, dev) {
>                         __set_bit(mc_hash(ha->addr), filter);
>                 }
> +
> +               __set_bit(mc_hash(dev->broadcast), filter);
> +
>                 bitmap_copy(vlan->mc_filter, filter, MACVLAN_MC_FILTER_SZ);
>         }
>         dev_uc_sync(vlan->lowerdev, dev);
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 8, 2013, 10:57 p.m. UTC | #2
From: Eric Dumazet <erdnetdev@gmail.com>
Date: Thu, 07 Feb 2013 18:02:57 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> commit cd431e738509e (macvlan: add multicast filter) forgot
> the broadcast case.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Maciej Żenczykowski <maze@google.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index f494da8..ce7c926 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -426,6 +426,9 @@  static void macvlan_set_mac_lists(struct net_device *dev)
 		netdev_for_each_mc_addr(ha, dev) {
 			__set_bit(mc_hash(ha->addr), filter);
 		}
+
+		__set_bit(mc_hash(dev->broadcast), filter);
+
 		bitmap_copy(vlan->mc_filter, filter, MACVLAN_MC_FILTER_SZ);
 	}
 	dev_uc_sync(vlan->lowerdev, dev);