Alistair John Strachan
2007-Apr-18 17:23 UTC
[Bridge] bridge-utils doesn't like name "bridge"
Hi, The "brctl show" (and probably other commands) do not work properly in the current git version of bridge-utils, and at least the 1.2 release in Debian testing. The reason is that some sloppy code detects bridges under sysfs by simply matching dirents matching "%s/bridge" under /sys/class/net. Unfortunately, if a bridge is actually _called_ "bridge", this logic fails because the "." directory matches. Since the expected files do not exist under /sys/class/net/./bridge, but under /sys/class/net/bridge/bridge, it causes a segfault. The attached patch fixes the problem by excluding any dirent with '.' at the beginning, which risks breaking nothing but does filter out ".", etc. as possible matches for bridge interfaces. Please apply. -- Cheers, Alistair. Final year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK. -------------- next part -------------- A non-text attachment was scrubbed... Name: bridge-utils-1.2-bridge-name-fix.diff Type: text/x-diff Size: 600 bytes Desc: not available Url : http://lists.linux-foundation.org/pipermail/bridge/attachments/20070316/4afb7850/bridge-utils-1.2-bridge-name-fix-0002.bin