patch-2.2.0-pre6 linux/net/bridge/br_tree.c

Next file: linux/net/core/dev.c
Previous file: linux/net/bridge/br.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre5/linux/net/bridge/br_tree.c linux/net/bridge/br_tree.c
@@ -7,6 +7,7 @@
 #include <linux/string.h>
 #include <linux/malloc.h>
 #include <linux/skbuff.h>
+#include <linux/netdevice.h>
 
 #include <net/br.h>
 #define _DEBUG_AVL
@@ -28,6 +29,10 @@
 static struct fdb **fhpp = &fhp;
 static int fdb_inited = 0;
 
+#ifdef DEBUG_AVL
+static void printk_avl (struct fdb * tree);
+#endif
+
 static int addr_cmp(unsigned char *a1, unsigned char *a2);
 
 /*
@@ -80,7 +85,7 @@
 		addr[4],
 		addr[5]);
 #endif /* DEBUG_AVL */
-	for (tree = &fdb_head ; ; ) {
+	for (tree = fhp ; ; ) {
 		if (tree == avl_br_empty) {
 #if (DEBUG_AVL)
 			printk("search failed, returning node 0x%x\n", (unsigned int)result);
@@ -446,10 +451,10 @@
 		/* don't write the local device */
 		if(tree->port != 0){
 			size = sprintf(*pbuffer,
-				   "%02x:%02x:%02x:%02x:%02x:%02x     eth%d       %d         %d\n",
+				   "%02x:%02x:%02x:%02x:%02x:%02x     %s       %d         %ld\n",
 				   tree->ula[0],tree->ula[1],tree->ula[2],
 				   tree->ula[3],tree->ula[4],tree->ula[5], 
-				   tree->port-1, tree->flags,CURRENT_TIME-tree->timer);
+				   port_info[tree->port].dev->name, tree->flags,CURRENT_TIME-tree->timer);
 
 			(*pos)+=size;
 			(*len)+=size;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov