Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753289AbaA3OqF (ORCPT ); Thu, 30 Jan 2014 09:46:05 -0500 Received: from casper.infradead.org ([85.118.1.10]:41103 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752572AbaA3OqD (ORCPT ); Thu, 30 Jan 2014 09:46:03 -0500 X-Greylist: delayed 1100 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Jan 2014 09:46:03 EST Date: Thu, 30 Jan 2014 14:27:40 +0000 From: Thomas Graf To: Tom Gundersen Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, John Fastabend , Nicolas Dichtel , Vlad Yasevich , Marcel Holtmann , "David S. Miller" Subject: Re: [PATCH] rtnetlink: return the newly created link in response to newlink Message-ID: <20140130142740.GC2185@casper.infradead.org> References: <1391087144-24490-1-git-send-email-teg@jklm.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391087144-24490-1-git-send-email-teg@jklm.no> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/14 at 02:05pm, Tom Gundersen wrote: > Userspace needs to reliably know the ifindex of the netdevs it creates, > as we cannot rely on the ifname staying unchanged. > > Earlier, a simlpe NLMSG_ERROR would be returned, but this returns the > corresponding RTM_NEWLINK on success instead. This breaks existing Netlink applications in user space. User space apps are not prepared to receive both a RTM_NEWLINK reply _and_ the ACK unless they have set NLM_F_ECHO in the original request. You can already reliably retrieve the ifindex by listening to RTNLGRP_LINK messages and be notified about the link created including all follow-up renames. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/