Ben Greear wrote: > Patrick McHardy wrote: > >> Stefan Rompf wrote: >> >>> Anyway, is it good to propagate __LINK_STATE_PRESENT then? The same >>> situation here, add a VLAN while the main interface is "not present", >>> and you are out. Can you try to revert the quoted part of my patch, >>> I'll rethink which flags should be copied on device creation. >> >> >> I tried both adding LINK_STATE_XOFF to the negated flags and using >> VLAN_LINK_STATE_MASK, both as expected solve the problem for me. >> I have to admit I was wondering about LINK_STATE_PRESENT as well >> (was going to complain about that too until I noticed it is also >> set in VLAN_LINK_STATE_MASK). Maybe Ben can tell us the idea behind >> this? > > > I believe this link-state logic was added by someone else. I'm not > sure exactly what these flags are supposed to do, so I am not sure if they > should be propagated to the VLAN or not. I looked into this. The present flag used to get propagated from the real device until this patch, presumably to make sure no operations on the vlan device will be passed through to the underlying device when it is not present. This patch should take care both of this problem and the problem of propagating __LINK_STATE_XOFF without ever clearing it again. Stefan, does this look right to you?