]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/br_fdb.c
firmware: fix the request_firmware() dummy
[linux-2.6-omap-h63xx.git] / net / bridge / br_fdb.c
index 69b70977f00061610b30fc86475e167bf49f4ee0..72c5976a5ce3056d36a145222616f78d66639019 100644 (file)
@@ -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;
                }
        }
@@ -285,7 +285,11 @@ int br_fdb_fillbuf(struct net_bridge *br, void *buf,
 
                        /* convert from internal format to API */
                        memcpy(fe->mac_addr, f->addr.addr, ETH_ALEN);
+
+                       /* due to ABI compat need to split into hi/lo */
                        fe->port_no = f->dst->port_no;
+                       fe->port_hi = f->dst->port_no >> 8;
+
                        fe->is_local = f->is_local;
                        if (!f->is_static)
                                fe->ageing_timer_value = jiffies_to_clock_t(jiffies - f->ageing_timer);
@@ -384,6 +388,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 */