netdev
[Top] [All Lists]

Re: PPP-over-L2TP kernel support, patch for review

To: Martijn van Oosterhout <kleptog@xxxxxxxxx>
Subject: Re: PPP-over-L2TP kernel support, patch for review
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Sep 2004 18:17:41 +1000
Cc: davem@xxxxxxxxxxxxx, jchapman@xxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040908073238.GB18285@xxxxxxxxx>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686))
Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote:
> 
> By my calculations, 
> 
> sizeof(struct pppoe_addr) = 2 + ETH_ALEN + IFNAMSIZ = 2 + 6 + 16 = 24 bytes
> sizeof(struct pppol2tp_addr) = sizeof(int) + sizeof(sockaddr_in) + 4 * 2
>                             = 4 + 16 + 8 = 28 + possibly padding
> 
> So the answer is: I think so. However, I'm not sure why this is an
> issue. struct sockaddr is passed back and forth between userspace and
> kernelspace has many varying sizes (sockaddr_un is quite large). What
> could be affected? getsockname, connect and bind all take a length
> argument. Or are you referring to the possibility of it affecting other
> structures it's embedded in?

Any existing user-space binary that has struct sockaddr_pppox in it will
be broken by your change.

Perhaps you can create a new sockaddr type?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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