Re: Double stacked VLANs (was Re: Question on header check)

Alex Zeffertt <[email protected]> Tue, 20 Jun 2006 09:46:04 +0100
Newsgroups gmane.linux.drivers.vlan
Message-ID <[email protected]>
Peter Stuge wrote:
> On Mon, Jun 19, 2006 at 10:04:46AM -0700, Ben Greear wrote:
>> Alex Zeffertt wrote:
>>> Frederik Deweerdt wrote:
>>> IMHO, raw sockets *should* always tag, rather than tag or not tag 
>>> depending on whether the
>>> frame is already tagged.  It just seems more logical and consistent.
>> If a program is clever enough that it thinks it can send raw packets,
>> I think it can send vlan tags too.  But, we have to be able to remain
>> backwards compat allowing sending raw ether frames to a vlan and have
>> the vlan encapsulate.
> 
> I would expect a raw socket to be no different from an IPv4 socket.
> If the socket is bound to an interface, the socket should expect an
> ethernet packet and that packet should be sent out the interface
> without interference:
> 
> packet on socket on eth0 = no tag on packet on wire
> packet on socket on eth0.1 = VLAN1 tag on packet on wire
> packet on socket on eth0.1.2 = VLAN2 tag on VLAN1 tag on packet on wire
> 

I agree.  If the program which owns the raw socket *really* wants to send
a non-vlan frame then it would probably use eth0!

> 
> Agreed, we must be backwards-compatible. If need be q(inq)+ can
> require explicit enabling with vconfig.
> 

Good idea.

Alex