1 May 2008 22:42
[PATCH] bridge: forwarding table information for >256 devices
Stephen Hemminger <shemminger <at> vyatta.com>
2008-05-01 20:42:09 GMT
2008-05-01 20:42:09 GMT
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 <shemminger <at> vyatta.com> --- a/include/linux/if_bridge.h 2008-04-28 15:27:05.000000000 -0700 +++ b/include/linux/if_bridge.h 2008-04-28 15:31:38.000000000 -0700 <at> <at> -97,7 +97,9 <at> <at> struct __fdb_entry __u8 port_no; __u8 is_local; __u32 ageing_timer_value; - __u32 unused; + __u8 port_hi; + __u8 pad0; + __u16 unused; }; #ifdef __KERNEL__ --- a/net/bridge/br_fdb.c 2008-04-28 15:27:05.000000000 -0700 +++ b/net/bridge/br_fdb.c 2008-04-28 15:31:38.000000000 -0700 <at> <at> -285,7 +285,11 <at> <at> int br_fdb_fillbuf(struct net_bridge *br /* convert from internal format to API */ memcpy(fe->mac_addr, f->addr.addr, ETH_ALEN);(Continue reading)
RSS Feed