From: Martijn van Oosterhout <kleptog@svana.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: James Chapman <jchapman@katalix.com>, netdev@oss.sgi.com
Subject: Re: PPP-over-L2TP kernel support, patch for review
Date: Wed, 8 Sep 2004 17:32:41 +1000 [thread overview]
Message-ID: <20040908073238.GB18285@svana.org> (raw)
In-Reply-To: <20040907155657.2ab6a4bb.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
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@katalix.com> 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@svana.org> 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.
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2004-09-08 7:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-06 11:59 PPP-over-L2TP kernel support, patch for review James Chapman
2004-09-07 22:56 ` David S. Miller
2004-09-08 7:32 ` Martijn van Oosterhout [this message]
2004-09-08 8:17 ` Herbert Xu
2004-09-08 8:38 ` Martijn van Oosterhout
2004-09-08 8:46 ` Herbert Xu
2004-09-08 9:04 ` Martijn van Oosterhout
2004-09-08 10:04 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2004-09-06 11:55 James Chapman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040908073238.GB18285@svana.org \
--to=kleptog@svana.org \
--cc=davem@davemloft.net \
--cc=jchapman@katalix.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).