Subject: Re: Question about netns & AF_UNIX

From: Dan Smith <[email-masked]>
Date: Thu, 27 May 2010 11:08:56 -0700

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: [email-masked]