Subject: Re: vlan: update vlan carrier state for admin up/down

From: Ben Greear <[email-masked]>
Date: Sun, 26 Apr 2009 12:58:35 -0700

Jay Vosburgh wrote:
>> If so, I think that is not a good idea and could possibly be considered
>> a security issue.  I think instead there should be a new flag for VLANs
>> that is 'preferred-admin-state'.  To be UP, both the underlying device
>> and the preferred state must be UP.  That should allow bouncing eth0
>> w/out affecting the eventual admin state of the VLANs on eth0 in
>> the example above.
>>     
>
> 	I dunno if it's a security issue, but I'd agree it's wrong.  I
> looked, and I suspect that a couple of judiciously placed "if
> (dev->flags & IFF_UP)" bits ought to sort things out by simply not
> copying the carrier state to the upper level VLAN device if that device
> is down.  Unless somebody works this up over the weekend, I'll work that
> out on Monday.
>   
That may be fine.  I suppose you'll also be ignoring admin state changes 
for the
underlying devices in the VLAN code?  Ie, if eth0 goes admin down, you won't
change the eth0.5 vlan to be admin down?

> 	Would they actually need a flag, or could it be worked out just
> by checking their IFF_UP-ness?
>   
If no admin state is propagated at all, I think you can skip any extra 
flags.  But,
if you want to propagate admin state (as the kernel does now with VLANs),
then I don't see how you can get by without another flag.

Thanks,
Ben

-- 
Ben Greear <[email-masked]> 
Candela Technologies Inc  http://www.candelatech.com