From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: RTM_NEWLINK not received by application when connecting multiple devices simultaneously Date: Fri, 20 Apr 2012 09:15:59 -0700 Message-ID: <20120420091559.732541ef@nehalam.linuxnetplumber.net> References: <4F90208E.6070201@candelatech.com> <20120419075452.379f711b@s6510.linuxnetplumber.net> <20120419133635.7d816d67@nehalam.linuxnetplumber.net> <20120420081400.67a98836@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Ben Greear , netdev@vger.kernel.org To: Kristian Evensen Return-path: Received: from mail.vyatta.com ([76.74.103.46]:42417 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755108Ab2DTQQH (ORCPT ); Fri, 20 Apr 2012 12:16:07 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 20 Apr 2012 18:04:49 +0200 Kristian Evensen wrote: > I have uploaded a compressed version of my listener code here: > http://pastebin.com/f1NPYGSh > > The othe operations my application do related to netlink, is to > configure the sockets. Could it be that the configuration messages > somehow disturb the retrieval of other messages, as they all use the > same mnl_sock? None of them requests any replies (they are all > RTM_NEW*/NLM_F_CREATE), but I am not sure about the internal working > of netlink. Most applications using netlink listening have two sockets, one for events the other for requests. The problem is that your own requests will generate events and it is hard to tell what to expect next the response (ACK) or the async event when using the same socket.