From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: IPv4 multicast and mac-vlans acting weird on 3.0.4+
Date: Wed, 05 Oct 2011 23:36:43 +0200 [thread overview]
Message-ID: <1317850603.3457.21.camel@edumazet-laptop> (raw)
In-Reply-To: <4E8CC474.7050803@candelatech.com>
Le mercredi 05 octobre 2011 à 13:56 -0700, Ben Greear a écrit :
> Wouldn't you have the same problem with two real Ethernet interfaces on
> the same LAN, or two 802.1Q devices for that matter? The addrs will all
> be the same in that case too?
>
Usually multicast is coupled with routing.
A JOIN message from your app wont be sent on all interfaces...
But yes, we might have a similar issue with regular vlans.
Probably nobody noticed yet. Just say no to fragments :)
> Also, if I have just a single mac-vlan active (the other 3 are 'ifconfig foo down'),
> I still see the problem with mcast.
>
Thats another bug : macvlan doesnt test IFF_UP on broadcasts, only for
unicast messages. Please test following patch.
> From what you describe, I am thinking I may be hitting a different
> issue. Any ideas on how to figure out why exactly the NF_HOOK isn't
> calling the ip_rcv_finish method?
>
Really I believe I tried to explain the thing already...
ip_local_deliver() -> ip_defrag() :
[PATCH] macvlan: dont send frames on DOWN devices
Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index b100c90..94a0282 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -145,7 +145,8 @@ static void macvlan_broadcast(struct sk_buff *skb,
hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) {
if (vlan->dev == src || !(vlan->mode & mode))
continue;
-
+ if (!(vlan->dev->flags & IFF_UP))
+ continue;
nskb = skb_clone(skb, GFP_ATOMIC);
err = macvlan_broadcast_one(nskb, vlan, eth,
mode == MACVLAN_MODE_BRIDGE);
next prev parent reply other threads:[~2011-10-05 21:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 16:46 IPv4 multicast and mac-vlans acting weird on 3.0.4+ Ben Greear
2011-10-05 19:54 ` Eric Dumazet
2011-10-05 20:09 ` Ben Greear
2011-10-05 20:17 ` Eric Dumazet
2011-10-05 20:19 ` Ben Greear
2011-10-05 20:31 ` Eric Dumazet
2011-10-05 20:56 ` Ben Greear
2011-10-05 21:36 ` Eric Dumazet [this message]
2011-10-05 21:52 ` Ben Greear
2011-10-05 22:35 ` Ben Greear
2011-10-06 20:28 ` [PATCH net-next] macvlan: handle fragmented multicast frames Eric Dumazet
2011-10-07 16:44 ` Ben Greear
2011-10-10 16:27 ` Ben Greear
2011-10-10 16:41 ` Eric Dumazet
2011-10-10 16:53 ` Ben Greear
2011-10-19 3:22 ` David Miller
2011-10-06 20:42 ` IPv4 multicast and mac-vlans acting weird on 3.0.4+ Eric Dumazet
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=1317850603.3457.21.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.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