[Netnice-kernels] Re: inetd on OpenBSD
Status: Alpha
Brought to you by:
taost6
From: Scott B. <sco...@ve...> - 2004-11-15 17:12:20
|
Hi Takashi, On Sun, 14 Nov 2004, Takashi Okumura wrote: > hi scott, > > sorry for the slow reply. because nn_create() wraps the created process > with a VIF before it does an exec call, i think that any sockets created > after the exec will share the created VIF. the reason because the sockets > you observed were not sharing the created VIF is probably because, they > are inherited from the inetd. so, we'll need to reconnect all the sockets, > probably inside nn_create(), as you suggested... > I think this is easy to fix. > but, i have been thinking, in such a case, all the sockets should be > "disconnected", since the situation in which sockets are connected to > a VIF which is a parent of the process which accommodates the sockets > is a violation of the VIF association rule. > This is not clear to me. In inetd all the sockets are inherited by the child but they are closed (disconnected) in the inetd parent. All that I see as being incorrect is that the inherited sockets are not linked to the correct VIF in the child process. I only see this as an inetd problem. Maybe you can explain the error in my understanding as I don't see this as a problem in the netnice internals. The behavior that I observe in both Linux and FreeBSD is that when a process creates sockets, the sockets are attached to a copy of that process's associated VIF. When a new process is created it inherits the parents process VIF. A process can change its associated VIF but this will not change the VIF association of any sockets currently in existence. Only new sockets will be connected to the new process VIF. If a process wants a socket to be associated with a specific VIF it needs to either explicitly set the symlink in Pso_dir or it must first attach the VIF as its process specific VIF as a symlink under Pso_list and then create the socket. Looking at what you wrote, are you saying that when a process does the symlink operation in Pso_list that all the sockets under Pso_dir need to be reattached as well? > so, it looks like a serious bug, both in the kernel and in the inetd > implementation. i appreciate your bug report, and would be happy > if you take care of the linux side of the issue (both in the kernel > and in the userland). > > best, > > -- taka > Thanks, Scott Brumbaugh |