patch-2.2.3 linux/net/bridge/br_tree.c

Next file: linux/net/core/scm.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.2/linux/net/bridge/br_tree.c linux/net/bridge/br_tree.c
@@ -474,3 +474,27 @@
 
 	return;
 }
+
+/*
+ * Delete all nodes learnt by the port
+ */
+void br_avl_delete_by_port(int port)
+{
+        struct fdb *fdb, *next;
+
+	if (!fdb_inited)
+		fdb_init();
+
+        for(fdb = port_info[port].fdb; fdb != NULL; fdb = next) {
+                next = fdb->fdb_next;
+                br_avl_remove(fdb);
+        }
+        port_info[port].fdb = NULL;
+
+        /* remove the local mac too */
+        next = br_avl_find_addr(port_info[port].dev->dev_addr);
+        if (next != NULL)
+                br_avl_remove(next);
+
+        return;
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)