]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/br_fdb.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / net / bridge / br_fdb.c
index 3fc697293819524823ee8bb4d9918493f12db6e0..9326c377822ed3d6e51e0116c73d22e4aaa84608 100644 (file)
@@ -36,7 +36,7 @@ int __init br_fdb_init(void)
        br_fdb_cache = kmem_cache_create("bridge_fdb_cache",
                                         sizeof(struct net_bridge_fdb_entry),
                                         0,
-                                        SLAB_HWCACHE_ALIGN, NULL, NULL);
+                                        SLAB_HWCACHE_ALIGN, NULL);
        if (!br_fdb_cache)
                return -ENOMEM;
 
@@ -44,7 +44,7 @@ int __init br_fdb_init(void)
        return 0;
 }
 
-void __exit br_fdb_fini(void)
+void br_fdb_fini(void)
 {
        kmem_cache_destroy(br_fdb_cache);
 }
@@ -136,7 +136,7 @@ void br_fdb_cleanup(unsigned long _data)
                        this_timer = f->ageing_timer + delay;
                        if (time_before_eq(this_timer, jiffies))
                                fdb_delete(f);
-                       else if (this_timer < next_timer)
+                       else if (time_before(this_timer, next_timer))
                                next_timer = this_timer;
                }
        }
@@ -384,6 +384,11 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
        if (hold_time(br) == 0)
                return;
 
+       /* ignore packets unless we are using this port */
+       if (!(source->state == BR_STATE_LEARNING ||
+             source->state == BR_STATE_FORWARDING))
+               return;
+
        fdb = fdb_find(head, addr);
        if (likely(fdb)) {
                /* attempt to update an entry for a local interface */