1 Apr 2008 09:30
Re: Bridge sysfs port_no overflow
Osama Abu Elsorour <fobowise <at> gmail.com>
2008-04-01 07:30:47 GMT
2008-04-01 07:30:47 GMT
Yes. I guess the unused field came in handy. Thanks! On Mar 31, 2008, at 5:42 PM, Stephen Hemminger wrote: > On Mon, 31 Mar 2008 09:11:31 +0200 > Osama Abu Elsorour <fobowise <at> gmail.com> wrote: > >> All >> >> We are running a setup with a large number of bridge ports that >> reaches the 900 ports. After switching to recent kernel and brctl- >> utils that uses the sysfs interface, we started noticing that the >> port >> numbers are mis-reported when issues the command: >> brctl showmacs br1 >> After tracing the code, we found that the problem lies in the sysfs >> structure called __fdb_entry. The port_no is declared as a u8 while >> it >> is u16 in the rest of the bridge structure. This causes the port_no >> to >> overflow when the bridge port number exceeds 255. >> >> The overflow line is in file br_fdb.c function br_fdb_fillbuf: >> fe->port_no = f->dst->port_no; >> where left hand port_no is _u8 and right hand is _u16. >> >> Even if it is unusual to have this number of ports on a single bridge >> it should be changed to the sake of consistency. >> >> This patch shows the change: >>(Continue reading)
RSS Feed