Skip to contentSkip to conversation

VLAN 1.6 against 2.4.16

PATCH In review Ben Greear 2 participants 3 messages Nov 28, 2001 Networking

lore
Share & tools
lore

Ben Greear

author
#0 lore raw

PATCH 1/1 VLAN 1.6 against 2.4.16

This patch is in response to the module compile problem noticed by Maciej. It also fixes a memory leak on module remove noticed by Ard van Breemen. Contact information has also been updated...

I've tested it on x86, both modular and otherwise, and it seems to work fine....

Enjoy,
Ben

*****************************************************************

net/8021q/vlan.c +16 -6
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlan.c linux.dev/net/8021q/vlan.c
@@ -1,11 +1,10 @@
 /*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
+ * INET		802.1Q VLAN
  *		Ethernet-type device handling.
  *
- * Authors:	Ben Greear <[email protected]>, <[email protected]>
+ * Authors:	Ben Greear <[email protected]>
+ *              Please send support related email to: [email protected]
+ *              VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
  *
  * Fixes:
  *              Fix for packet capture - Nick Eggleston <[email protected]>;
@@ -42,7 +41,7 @@
 
 static char vlan_fullname[] = "802.1Q VLAN Support";
 static unsigned int vlan_version = 1;
-static unsigned int vlan_release = 5;
+static unsigned int vlan_release = 6;
 static char vlan_copyright[] = " Ben Greear <[email protected]>";
 
 static int vlan_device_event(struct notifier_block *, unsigned long, void *);
@@ -105,6 +104,24 @@
 	return 0;
 }
 
+
+/*
+ * Cleanup of groups before exit
+ */
+
+static void vlan_group_cleanup(void)
+{
+ struct vlan_group* grp = NULL;
+        struct vlan_group* nextgroup;
+ for (grp = p802_1Q_vlan_list; (grp != NULL);) {
+ 
	nextgroup = grp->next;
+ 
	kfree(grp);
+ 
	grp = nextgroup;

+ }
+ p802_1Q_vlan_list = NULL;
+}/* vlan_group_cleanup */
+
+
/*
* Module 'remove' entry point.
* o delete /proc/net/router directory and static entries.
@@ -116,7 +133,7 @@

dev_remove_pack(&vlan_packet_type);
vlan_proc_cleanup();
-
+ vlan_group_cleanup();
vlan_ioctl_hook = NULL;
}

net/8021q/vlan_dev.c +4 -5
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlan_dev.c linux.dev/net/8021q/vlan_dev.c
@@ -1,11 +1,10 @@
 /*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
+ * INET		802.1Q VLAN
  *		Ethernet-type device handling.
  *
- * Authors:	Ben Greear <[email protected]>, <[email protected]>
+ * Authors:	Ben Greear <[email protected]>
+ *              Please send support related email to: [email protected]
+ *              VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
  *
  * Fixes:       Mar 22 2001: Martin Bokaemper <[email protected]>
  *                - reset skb->pkt_type on incoming packets when MAC was changed
net/8021q/vlanproc.c +2 -2
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlanproc.c linux.dev/net/8021q/vlanproc.c
@@ -116,7 +116,7 @@
  *	Clean up /proc/net/vlan entries
  */
 
-void __exit vlan_proc_cleanup(void)
+void vlan_proc_cleanup(void)
 {
 	if (proc_vlan_conf)
 		remove_proc_entry(name_conf, proc_vlan_dir);
@@ -462,7 +462,7 @@
 	return 0;
 }
 
-void __exit vlan_proc_cleanup(void)
+void vlan_proc_cleanup(void)
 {
 	return;
 }
net/README +0 -0
diff -u -r -N -X /home/greear/exclude.list linux/net/README linux.dev/net/README
@@ -23,4 +23,4 @@
 unix	 

[email protected]
x25

	[email protected]

bluetooth [email protected]
-
+8021q [email protected], [email protected]

Signature · 3 lines
Ben Greear <[email protected]>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
#1 lore raw

From: Ben Greear <[email protected]>
Date: Wed, 28 Nov 2001 00:27:22 -0700

+ struct vlan_group* nextgroup;
+
for (grp = p802_1Q_vlan_list; (grp != NULL);) {

Your mail agent wraps lines, this patch isn't going to apply for anyone.

author
#2 lore raw
In reply to Ben Greear

It's attached this time, hopefully that will cause less problems for people.

Quoted 16 lines · David S. Miller
   From: Ben Greear <[email protected]>
   Date: Wed, 28 Nov 2001 00:27:22 -0700

   +        struct vlan_group* nextgroup;
   + 
   for (grp = p802_1Q_vlan_list; (grp != NULL);) {

Your mail agent wraps lines, this patch isn't going to apply for anyone.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 3 lines
Ben Greear <[email protected]>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
net/8021q/vlan.c +24 -7
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlan.c linux.dev/net/8021q/vlan.c
@@ -1,11 +1,10 @@
 /*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
+ * INET		802.1Q VLAN
  *		Ethernet-type device handling.
  *
- * Authors:	Ben Greear <[email protected]>, <[email protected]>
+ * Authors:	Ben Greear <[email protected]>
+ *              Please send support related email to: [email protected]
+ *              VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
  * 
  * Fixes:
  *              Fix for packet capture - Nick Eggleston <[email protected]>;
@@ -42,7 +41,7 @@
 
 static char vlan_fullname[] = "802.1Q VLAN Support";
 static unsigned int vlan_version = 1;
-static unsigned int vlan_release = 5;
+static unsigned int vlan_release = 6;
 static char vlan_copyright[] = " Ben Greear <[email protected]>";
 
 static int vlan_device_event(struct notifier_block *, unsigned long, void *);
@@ -105,6 +104,24 @@
 	return 0;
 }
 
+
+/*
+ * Cleanup of groups before exit
+ */
+
+static void vlan_group_cleanup(void)
+{
+	struct vlan_group* grp = NULL;
+        struct vlan_group* nextgroup;
+	for (grp = p802_1Q_vlan_list; (grp != NULL);) {
+		nextgroup = grp->next;
+		kfree(grp);
+		grp = nextgroup;
+	}
+        p802_1Q_vlan_list = NULL;
+}/* vlan_group_cleanup */
+
+
 /*
  *     Module 'remove' entry point.
  *     o delete /proc/net/router directory and static entries.
@@ -116,7 +133,7 @@
 
 	dev_remove_pack(&vlan_packet_type);
 	vlan_proc_cleanup();
-
+        vlan_group_cleanup();
 	vlan_ioctl_hook = NULL;
 }
 
net/8021q/vlan_dev.c +4 -5
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlan_dev.c linux.dev/net/8021q/vlan_dev.c
@@ -1,11 +1,10 @@
 /*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
+ * INET		802.1Q VLAN
  *		Ethernet-type device handling.
  *
- * Authors:	Ben Greear <[email protected]>, <[email protected]>
+ * Authors:	Ben Greear <[email protected]>
+ *              Please send support related email to: [email protected]
+ *              VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
  * 
  * Fixes:       Mar 22 2001: Martin Bokaemper <[email protected]>
  *                - reset skb->pkt_type on incoming packets when MAC was changed
net/8021q/vlanproc.c +2 -2
diff -u -r -N -X /home/greear/exclude.list linux/net/8021q/vlanproc.c linux.dev/net/8021q/vlanproc.c
@@ -116,7 +116,7 @@
  *	Clean up /proc/net/vlan entries
  */
 
-void __exit vlan_proc_cleanup(void)
+void vlan_proc_cleanup(void)
 {
 	if (proc_vlan_conf)
 		remove_proc_entry(name_conf, proc_vlan_dir);
@@ -462,7 +462,7 @@
 	return 0;
 }
 
-void __exit vlan_proc_cleanup(void)
+void vlan_proc_cleanup(void)
 {
 	return;
 }
net/README +1 -1
diff -u -r -N -X /home/greear/exclude.list linux/net/README linux.dev/net/README
@@ -23,4 +23,4 @@
 unix			[email protected]
 x25			[email protected]
 bluetooth		[email protected]
-
+8021q                   [email protected], [email protected]