* Question about netns & AF_UNIX
@ 2010-05-27 14:38 Martín Ferrari
2010-05-27 18:08 ` Dan Smith
2010-05-27 20:16 ` Daniel Lezcano
0 siblings, 2 replies; 4+ messages in thread
From: Martín Ferrari @ 2010-05-27 14:38 UTC (permalink / raw)
To: netdev; +Cc: Mathieu Lacage
Hi, again a question about netns...
I seem to recall being able to use AF_UNIX sockets across network name
spaces, but I cannot reproduce that with a current kernel. Probably my
test was fubar (I've lost the script).
In any case: is a design decision to forbid this, even when the file
system is shared? I found some discussions from 2008, but I don't see
an agreement being reached...
I also wonder if filedescriptor passing thru ancilliary messages will
work (that is, with unix sockets that I've created before the netns
change).
Thanks
--
Martín Ferrari
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about netns & AF_UNIX
2010-05-27 14:38 Question about netns & AF_UNIX Martín Ferrari
@ 2010-05-27 18:08 ` Dan Smith
2010-05-31 9:19 ` Martín Ferrari
2010-05-27 20:16 ` Daniel Lezcano
1 sibling, 1 reply; 4+ messages in thread
From: Dan Smith @ 2010-05-27 18:08 UTC (permalink / raw)
To: Martín Ferrari; +Cc: netdev, Mathieu Lacage
MF> I seem to recall being able to use AF_UNIX sockets across network name
MF> spaces, but I cannot reproduce that with a current kernel. Probably my
MF> test was fubar (I've lost the script).
If you are in different network namespaces, the binding of UNIX
sockets is also kept separate. Even though the filesystem is shared,
this seems to make the most sense to me. Named pipes on the
filesystem would still be shared, by the way.
MF> I also wonder if filedescriptor passing thru ancilliary messages will
MF> work (that is, with unix sockets that I've created before the netns
MF> change).
I think that will work, as will binding a socket and then doing a
setns().
--
Dan Smith
IBM Linux Technology Center
email: danms@us.ibm.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about netns & AF_UNIX
2010-05-27 14:38 Question about netns & AF_UNIX Martín Ferrari
2010-05-27 18:08 ` Dan Smith
@ 2010-05-27 20:16 ` Daniel Lezcano
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2010-05-27 20:16 UTC (permalink / raw)
To: Martín Ferrari; +Cc: netdev, Mathieu Lacage
On 05/27/2010 04:38 PM, Martín Ferrari wrote:
> Hi, again a question about netns...
>
> I seem to recall being able to use AF_UNIX sockets across network name
> spaces, but I cannot reproduce that with a current kernel. Probably my
> test was fubar (I've lost the script).
>
No, that was never the case. Maybe you tested with a patched kernel
allowing to cross-namespace connect.
> In any case: is a design decision to forbid this, even when the file
> system is shared? I found some discussions from 2008, but I don't see
> an agreement being reached...
>
There was a discussion about that but with a simple hack removing the
test against the namespace when connecting.
The problem is nobody investigated that against credentials in ancillary
messages, or other particularity of the af_unix socket vs the namespaces.
> I also wonder if filedescriptor passing thru ancilliary messages will
> work (that is, with unix sockets that I've created before the netns
> change).
>
Yes.
Thanks
-- Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about netns & AF_UNIX
2010-05-27 18:08 ` Dan Smith
@ 2010-05-31 9:19 ` Martín Ferrari
0 siblings, 0 replies; 4+ messages in thread
From: Martín Ferrari @ 2010-05-31 9:19 UTC (permalink / raw)
To: Dan Smith; +Cc: netdev, Mathieu Lacage
Hi,
On Thu, May 27, 2010 at 20:08, Dan Smith <danms@us.ibm.com> wrote:
> If you are in different network namespaces, the binding of UNIX
> sockets is also kept separate. Even though the filesystem is shared,
> this seems to make the most sense to me.
To me it was the opposite, I thought natural that UNIX sockets would
continue to work, at least when they are bound to a filesystem entry.
Also it is a nice and clean way to communicate across namespaces
without assuming lots of things about the network configuration.
> Named pipes on the
> filesystem would still be shared, by the way.
Yes, today I've tried with named pipes and worked. It's just that they
aren't as nice as UNIX sockets :)
Thanks.
--
Martín Ferrari
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-31 9:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 14:38 Question about netns & AF_UNIX Martín Ferrari
2010-05-27 18:08 ` Dan Smith
2010-05-31 9:19 ` Martín Ferrari
2010-05-27 20:16 ` Daniel Lezcano
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).