netdev
[Top] [All Lists]

PATCH: Re: tun device - bug or feature? WAS(Re: IMQ / new Dummy device p

To: Max Krasnyansky <maxk@xxxxxxxxxxxx>
Subject: PATCH: Re: tun device - bug or feature? WAS(Re: IMQ / new Dummy device post.
From: jamal <hadi@xxxxxxxxxx>
Date: 05 Jun 2004 09:24:56 -0400
Cc: netdev@xxxxxxxxxxx, syrius.ml@xxxxxxxxxx, Jeff Garzik <jgarzik@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>
In-reply-to: <1084209482.758.15.camel@localhost>
Organization: jamalopolis
References: <wazza.87ad18jbdl.fsf@xxxxxxxxxx> <1082427350.1034.70.camel@xxxxxxxxxxxxxxxx> <wazza.87fzayw1fy.fsf@xxxxxxxxxx> <wazza.87fzaxmr6x.fsf@xxxxxxxxxx> <wazza.87hdvddqxq.fsf@xxxxxxxxxx> <1082639764.1059.81.camel@xxxxxxxxxxxxxxxx> <87oepjx65r.87n053x65r@xxxxxxxxxxxxxxxxxxxxx> <1082719745.1057.27.camel@xxxxxxxxxxxxxxxx> <1082816083.1054.32.camel@xxxxxxxxxxxxxxxx> <1083007898.7788.276.camel@localhost> <1084017322.1041.30.camel@xxxxxxxxxxxxxxxx> <1084209482.758.15.camel@localhost>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Ok, trivial patch attached. Applies to both latest 2.6 and 2.4
I will go hunting for more drivers that do this; for now, a good start
here.

cheers,
jamal


On Mon, 2004-05-10 at 13:18, Max Krasnyansky wrote:
> On Sat, 2004-05-08 at 04:55, jamal wrote:
> > Max, Dave, Jeff,
> > 
> > I get what was bothering me now - it took me a while to formulate it:
> > 
> > TUN_TUN_DEV dev->type is ARPHRD_PPP
> > dev->type is really related to link layer header, perhaps at the low
> > level if neighbor discovery works well then we have a link-headerless
> > packet which gets manipulated with the correct header by some generic
> > code. The combination of dev->type and dev->hard_header_len works
> > together to achieve this.
> > In the case of TUN_TUN_DEV, the header_len is 0 ;->
> > To be of type ARPHRD_PPP, tun needs to have a header_len which is the
> > size of the l2 ppp header.
> > As an example, TUN_TAP_DEV is fine as type ARPHRD_ETHER and header_len
> > of ETH_HLEN.
> > 
> > A lot of devices are abusing this system, tun is not the only one.
> > 
> > My suggestion is to change dev->type to ARPHRD_VOID for TUN_TUN_DEV or
> > we introduce something like ARPHDR_NONE for devices with link layer
> > headers of size 0.
> > 
> > thoughts?
> 
> I have no problem with that. I mean introducing new ARPHDR_ type.
> ARPHDR_PPP was simply most appropriate for TUN that's why I picked it.
> I vote for ARPHDR_NONE.
> 
> Thanks
> Max
> 
> 
> 
> 

Attachment: tun24
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>