[netcf-devel] Why check for IFF_RUNNING in if_is_active?

Hendrik Schwartke hendrik at os-t.de
Wed Sep 5 14:45:21 UTC 2012


Hi,

I'm wondering why the IFF_RUNNING flag is checked in if_is_active. 
Shouldn't it be enough to check only for IFF_UP?
My problem is that whenever I set a device up which is intentionally not 
running (because the cable is not plugged in or because it's a tap 
device) I got an error although everything is perfectly right.
So I have to write a wrapper to distinguish  between "real" error 
messages and the "cable is not inserted" error.

Is there any reason for checking both flags I didn't notice?

Regards
Hendrik


More information about the netcf-devel mailing list