From: Lennart Poettering <lennart@poettering.net>
To: Tom Gundersen <teg@jklm.no>
Cc: Chuck Lever <chuck.lever@oracle.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Michal Schmidt <mschmidt@redhat.com>,
Steve Dickson <steved@redhat.com>,
systemd-devel@lists.freedesktop.org,
libtirpc <libtirpc-devel@lists.sourceforge.net>
Subject: Re: [PATCH] rpcbind: add support for systemd socket activation
Date: Wed, 1 Feb 2012 22:45:36 +0100 [thread overview]
Message-ID: <20120201214536.GL18571@tango.0pointer.de> (raw)
In-Reply-To: <CAG-2HqVC3k+vmO2ieARqrKFEuP1RWZmBZ63J088DvBzSh2EdMA@mail.gmail.com>
On Wed, 01.02.12 17:37, Tom Gundersen (teg@jklm.no) wrote:
> >> + /* Try to find if one of the systemd sockets we were given match
> >> + * our netconfig structure. */
> >> +
> >> + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
> >> + struct __rpc_sockinfo si_other;
> >> + union {
> >> + struct sockaddr sa;
> >> + struct sockaddr_un un;
> >> + struct sockaddr_in in4;
> >> + struct sockaddr_in6 in6;
> >> + struct sockaddr_storage storage;
> >> + } sa;
> >
> > Why is sockaddr_storage included in this union?
>
> This is from Lennart's original patch. Lennart, care to comment?
Well, simply because sockaddr_storage is the actual struct one should
normally use for this kind of thing (where you try to determine a
sockaddr from a socket you don't know at all). With one exception
however, sockaddr_un is actually longer than sockaddr_storage, which is
documented borkedness in the socket API.
Lennart
--
Lennart Poettering - Red Hat, Inc.
next prev parent reply other threads:[~2012-02-01 21:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 15:18 [PATCH v2] rpcbind: add support for systemd socket activation Tom Gundersen
2011-12-15 14:54 ` [systemd-devel] " Lennart Poettering
2011-12-19 23:42 ` Cristian Rodriguez
2011-12-23 1:05 ` [PATCH] " Tom Gundersen
2011-12-23 1:34 ` Cristian Rodríguez
2011-12-23 2:40 ` Jim Rees
2012-02-01 11:47 ` Tom Gundersen
2012-02-01 15:32 ` Chuck Lever
2012-02-01 16:37 ` Tom Gundersen
2012-02-01 18:16 ` Chuck Lever
2012-02-01 19:48 ` Tom Gundersen
2012-02-01 21:45 ` Lennart Poettering [this message]
2012-02-01 22:03 ` Chuck Lever
2012-02-01 22:30 ` Lennart Poettering
2012-02-03 10:58 ` [Libtirpc-devel] " Ian Kent
2012-02-03 17:03 ` Chuck Lever
2012-02-04 8:59 ` [PATCH v2] " Tom Gundersen
2012-02-01 19:59 ` [PATCH] " Chuck Lever
-- strict thread matches above, loose matches on Subject: below --
2014-11-25 17:05 [PATCH] rpcbind: systemd socket activation (v2) Steve Dickson
2014-11-25 17:05 ` [PATCH] rpcbind: add support for systemd socket activation Steve Dickson
2014-11-26 12:48 ` Steve Dickson
2014-11-21 16:43 [PATCH] rpcbind: " Steve Dickson
2014-11-21 16:43 ` [PATCH] rpcbind: add support for " Steve Dickson
2010-07-19 2:19 Lennart Poettering
2010-07-21 17:56 ` Chuck Lever
2010-07-21 21:56 ` Lennart Poettering
2010-07-23 15:13 ` Chuck Lever
2010-07-23 16:27 ` Lennart Poettering
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=20120201214536.GL18571@tango.0pointer.de \
--to=lennart@poettering.net \
--cc=chuck.lever@oracle.com \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=steved@redhat.com \
--cc=systemd-devel@lists.freedesktop.org \
--cc=teg@jklm.no \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.