From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [patch 3/3][netns] remove timewait sockets at cleanup Date: Thu, 27 Sep 2007 10:36:17 +0200 Message-ID: <46FB6B81.4040907@fr.ibm.com> References: <20070924132935.398625515@mai.toulouse-stg.fr.ibm.com> <20070924133315.075225268@mai.toulouse-stg.fr.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org List-Id: containers.vger.kernel.org Eric W. Biederman wrote: > Daniel Lezcano writes: > >> From: Daniel Lezcano >> >> Denis Lunev spotted that if we take a reference to the network namespace >> with the timewait sockets, we will need to wait for their expiration to >> have the network namespace freed. This is a waste of time, the timewait >> sockets are for avoiding to receive a duplicate packet from the network, >> if the network namespace is freed, the network stack is removed, so no >> chance to receive any packets from the outside world. >> >> This patchset remove/destroy the timewait sockets when the >> network namespace is freed. > > This code is in the wrong place. Please do the register_net_subsys > thing so we can keep the code in net/ipv4/inet_timewait_sock.c > > This code just need to be an exit method. Thanks Eric, I will fix that.