Hi All,
I have one netcf question, please help me to resolve it, thanks.
I can set a IFF_RUNNING flag to a bridge device which are no interface device attached.
What status of a flag on a bridge device in current kernel?(w/o interface), is this a new
change in kernel or other component? In netcf, but there is a patch to fix that flag
issue, I can't understand it.
fix wrong status of bridge devices
The IFF_RUNNING flag is not set on a bridge device if there are no devices attached to it.
So bridges without attached devices are reported as inactive. Destroying inactive devices
leads to an error and thus the device can't be removed (easily) from the operating
system. This patch checks if the device is a bridge and if so ignores the IFF_RUNNING
flag.
https://git.fedorahosted.org/cgit/netcf.git/commit/?id=7fa5fa5a1e43e6e2af...
My testing results of IFF_RUNNING on non-device bridge:
Version:
[root@rhel6 boot]# rpm -q kernel netcf
kernel-2.6.32-468.el6.x86_64
netcf-0.2.4-1.el6.x86_64
[root@rhel6 ~]# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
[root@rhel6 ~]# ifconfig br0
br0 Link encap:Ethernet HWaddr 6A:3B:6F:DF:17:A9
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
[root@rhel6 ~]# ifconfig br0 up
[root@rhel6 ~]# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
[root@rhel6 ~]# ifconfig br0
br0 Link encap:Ethernet HWaddr 6A:3B:6F:DF:17:A9
inet6 addr: fe80::683b:6fff:fedf:17a9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:866 (866.0 b)