Subject: VLAN patches

From: Andersson Björn <[email-masked]>
Date: Mon, 30 Sep 2002 10:23:44 +0200

Hi,
I hope you are the right receiver of 8021q-patches.
We are running SuSe 8.0, i.e kernel 2.4.18.

- When addding several egress-mappings we get stuck in an eternal
loop if they end up in the same hash-bucket, see vlan_dev.c.path.

- If we try to remove a vlan with VID 0, ifconfig stops working
completly.
We fixed it with vlan.c.patch.

-- 
* Björn Andersson                   [email-masked] *
* Ericsson Enterprise AB            NA/EBC/BEES/DNCC                *
* Nacka Strand                      tel: +46-8-422 3512             *
* 13 189 Stockholm, Sweden          fax: +46-8-422 1010             *

--- linux-2.4.18.SuSE/net/8021q/vlan.c.orig	Wed Mar 27 13:57:17 2002
+++ linux-2.4.18.SuSE/net/8021q/vlan.c	Wed Sep 18 13:19:13 2002
@@ -207,7 +207,7 @@
 #endif
 
 	/* sanity check */
-	if ((vlan_id >= VLAN_VID_MASK) || (vlan_id <= 0))
+	if ((vlan_id >= VLAN_VID_MASK) || (vlan_id < 0))
 		return -EINVAL;
 
 	spin_lock_bh(&vlan_group_lock);
--- linux-2.4.18.SuSE/net/8021q/vlan_dev.c.orig	Wed Mar 27 13:57:17 2002
+++ linux-2.4.18.SuSE/net/8021q/vlan_dev.c	Wed Sep 18 13:19:52 2002
@@ -570,6 +570,7 @@
 					dev_put(dev);
 					return 0;
 				}
+				mp = mp->next;
 			}
 
 			/* Create a new mapping then. */