[quagga-dev 5286] Zebra and IFF_UP weird interface behavior
mike at vyatta.com
Wed Mar 12 21:53:29 GMT 2008
We're seeing a problem with zebra and setting the interface admin (IFF_UP) flag. Specifically, if the configured interface is administratively downed and upped zebra writes the following error to syslog:
"Can't set interface's address: Resource temporarily unavailable"
This error is generated by if_addr_wakeup() in zebra/interface.c on the IFF_UP=true event. Zebra skips further processing on this interface after failing to set the address.
The reason for the failure is that (linux 2.6.23) on an IFF_UP=false event the IP address is not removed from the interface and when zebra attempts to set the address on the following IFF_UP=true event it fails.
A further IFF_DOWN event will cause zebra to appear to hang (or at least subsequent vtysh commands hang).
This behavior can be fixed by removing the "continue;" statement immediately following this logged error message in if_addr_wakeup().
If we apply this code change zebra will no longer hang, but we are seeing another error where static routes are not reinserted back into the rib after the first IFF_UP=false, then IFF_UP=true event.
On the first IFF_UP=false event the static route will show that it is "unknown" rather than the expected "inactive" state (via show ip route).
I haven't solved this last issue and I'm not entirely convinced that removing the "continue" statement in order to solve the first problem is the correct fix (although zebra shouldn't fail on reinserting the address if the failure is due to the address already being present on the interface).
We're using a cut of the latest quagga source tree (this behavior is also in v0.99.9).
More information about the Quagga-dev