netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IGMP sent to Foreign VLAN
@ 2008-10-06 19:51 Jarod Neuner
  2008-10-07 23:07 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Jarod Neuner @ 2008-10-06 19:51 UTC (permalink / raw)
  To: netdev

I noticed a problem where the kernel is not responding to IGMP Queries
from several Level-3 network switches.  This behavior is caused by these
switches using VLAN tags on IGMP messages.  At first I thought the
switches were out of spec, but every other network stack I've checked
delivers packets with unconfigured VLAN assignments directly to the
incoming interface.  

This patch corrects my problem, but I'm still interested in discussion
about whether or not this should be a parameter in /proc/sys/net or even
if this policy change should be applied elsewhere in the the network
stack.

---

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 4bf014e..b65a8fd 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -158,9 +158,13 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        rcu_read_lock();
        skb->dev = __find_vlan_dev(dev, vlan_id);
        if (!skb->dev) {
-               pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
+               pr_debug("%s: WARNING: Forwarding VID: %u to dev: %s\n",
                         __func__, vlan_id, dev->name);
-               goto err_unlock;
+               skb->dev = dev;
+               skb_pull_rcsum(skb, VLAN_HLEN);
+               vlan_set_encap_proto(skb, vhdr);
+               rcu_read_lock();
+               return 0;
        }

        skb->dev->last_rx = jiffies;







^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-10-10 22:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 19:51 IGMP sent to Foreign VLAN Jarod Neuner
2008-10-07 23:07 ` David Miller
2008-10-07 23:53   ` Patrick McHardy
2008-10-08 23:34     ` Jarod Neuner
2008-10-09 12:31       ` Patrick McHardy
2008-10-09 16:18         ` Jarod Neuner
2008-10-10 16:28           ` Patrick McHardy
2008-10-10 22:45       ` Benny Amorsen

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).