On Tue, Sep 07, 2004 at 03:56:57PM -0700, David S. Miller wrote:
> On Mon, 6 Sep 2004 12:59:16 +0100
> James Chapman <jchapman@xxxxxxxxxxx> wrote:
> 2) Does this:
>
> struct sockaddr_pppox {
> sa_family_t sa_family; /* address family, AF_PPPOX */
> unsigned int sa_protocol; /* protocol identifier */
> union{
> struct pppoe_addr pppoe;
> + struct pppol2tp_addr pppol2tp;
> }sa_addr;
> }__attribute__ ((packed));
>
> Change the size of sockaddr_pppox on any platform? If so, you'll
> break pppox userspace with this change so we'd need find another
> way to do it.
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?
TIA,
--
Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
pgpDwTFmiiGv7.pgp
Description: PGP signature
|