Bug 98005 - bridge-utils errors incorrectly when there are no ports on the bridge
Bug#: 98005 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: robbat2@gentoo.org Reported By: uberlord@gentoo.org
Component: Applications
URL: 
Summary: bridge-utils errors incorrectly when there are no ports on the bridge
Keywords:  
Status Whiteboard: 
Opened: 2005-07-05 07:03 0000
Description:   Opened: 2005-07-05 07:03 0000
bridge-utils-1.0.4 and 1.0.6 error when there are no ports on the bridge when
compiled against libsysfs

Expected results
bridge name     bridge id               STP enabled     interfaces
br0             8000.000000000000       no


Actual Results
bridge name     bridge id               STP enabled     interfaces
br0             8000.000000000000       no               can't get port info:
Function not implemented

Unfortuantely, the error is dumped to stderr - whick sucks when you're trying
to work out the ports on a bridge - or the bridge of a port using userspace
tools.

------- Comment #1 From Roy Marples (RETIRED) 2005-07-05 07:05:14 0000 -------
Created an attachment (id=62666) [details]
Stops brctl from erroring when there are no listed ported in sysfs

applies cleanly to 1.0.6 - may apply to 1.0.4

------- Comment #2 From Roy Marples (RETIRED) 2005-07-05 07:06:39 0000 -------
(of course I meant to say that the error is dumped to stdout and not stderr, so
I cannot filter it in bash)

------- Comment #3 From Roy Marples (RETIRED) 2005-07-05 08:28:40 0000 -------
Created an attachment (id=62678) [details]
return errno instead of -ENOSYS when there are no ports on a bridge

------- Comment #4 From Robin Johnson 2005-07-11 20:38:31 0000 -------
in cvs now.
could you please send it upstream as well roy?

------- Comment #5 From Roy Marples (RETIRED) 2005-07-11 22:20:48 0000 -------
Punted the patch over to their source forge site

http://sourceforge.net/tracker/?group_id=26089&atid=386017