OpenVZ Forum


Home » Mailing lists » Devel » [patch 0/1][NETNS49] Make af_unix autobind per namespace
Re: [patch 0/1][NETNS49] Make af_unix autobind per namespace [message #21225 is a reply to message #21218] Wed, 03 October 2007 14:36 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Cedric Le Goater <clg@fr.ibm.com> writes:
> my 2 cnts,
>
> when 'restarting' a socket bound to an abstract name, we will have 
> a EADDRINUSE if we try to rebind it to an abtract name which is 
> already in use by a socket in a another namespace ? 

No.

> it seems to me that this is an identifier and like any identifier
> it should be private to the namespace, which probably means having
> unix_abstract_socket_table[] per net namespace.

Yes it is.  It is a hash table so we are filter the hash chain
and not having two copies of the table.  But effectively it's
the same thing.

All this patch was suggesting was having a per network namespace
copy of the data structure for the random number generator for
generating the name.  

The ``random number generator'' is just a 16bit counter that loops
through all 64k values seeing if a name is available and if so
using it.  Sharing our place in the loop between different namespaces
may be ineffeicient but it should work fine.

Eric
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] mark read_crX() asm code as volatile
Next Topic: [PATCH 03/33] task containersv11 add tasks file interface
Goto Forum:
  


Current Time: Thu Aug 15 08:23:43 GMT 2024

Total time taken to generate the page: 0.02901 seconds