From ae4f8fca4030a4e783fa4ccb0c9d8d8a8cf60a32 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 2 May 2008 16:53:33 -0700 Subject: bridge: forwarding table information for >256 devices The forwarding table binary interface (my bad choice), only exposes the port number of the first 8 bits. The bridge code was limited to 256 ports at the time, but now the kernel supports up 1024 ports, so the upper bits are lost when doing: brctl showmacs The fix is to squeeze the extra bits into small hole left in data structure, to maintain binary compatiablity. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- net/bridge/br_fdb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/bridge/br_fdb.c') diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 9326c377822e..72c5976a5ce3 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -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); -- cgit v1.2.2