From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Subject: Re: [PATCH] peer_pid checking in ip_queue Date: Wed, 24 Mar 2004 01:42:17 +0100 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <4060D969.9040900@eurodev.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: To: Henrik Nordstrom , netfilter-devel@lists.netfilter.org, Patrick McHardy , Harald Welte In-Reply-To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Hi, Henrik Nordstrom wrote: >What about when the user program closes? How bad it is to have read the >pid and then there is no userspace there? > > As Patrick pointed out before, netlink is not reliable, so it will drop the packets sent to an user space which doesn't exist without notification. But if the user space program closes properly, peer_pid will be reset. Have a look at ipq_rcv_nl_event and netlink_release. AFAIK, if the user space program hangs or dies, kernel will release the socket later, so for quite some time netlink will drop packets. Am I right? regards, Pablo