Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8E7DC169C4 for ; Fri, 8 Feb 2019 18:04:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF5B420855 for ; Fri, 8 Feb 2019 18:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727824AbfBHSE0 (ORCPT ); Fri, 8 Feb 2019 13:04:26 -0500 Received: from orbyte.nwl.cc ([151.80.46.58]:46106 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727391AbfBHSE0 (ORCPT ); Fri, 8 Feb 2019 13:04:26 -0500 Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.91) (envelope-from ) id 1gsAVk-0001eR-Gp; Fri, 08 Feb 2019 19:04:24 +0100 Date: Fri, 8 Feb 2019 19:04:24 +0100 From: Phil Sutter To: Stephen Hemminger Cc: netdev@vger.kernel.org, Roopa Prabhu Subject: Re: [iproute PATCH] ip-link: Fix listing of alias interfaces Message-ID: <20190208180424.GK26388@orbyte.nwl.cc> Mail-Followup-To: Phil Sutter , Stephen Hemminger , netdev@vger.kernel.org, Roopa Prabhu References: <20190207130527.9439-1-phil@nwl.cc> <20190208095647.047abca3@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208095647.047abca3@hermes.lan> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Stephen, On Fri, Feb 08, 2019 at 09:56:47AM -0800, Stephen Hemminger wrote: > On Thu, 7 Feb 2019 14:05:27 +0100 > Phil Sutter wrote: > > > Commit 50b9950dd9011 ("link dump filter") accidentally broke listing of > > links in the old alias interface notation: > > > > | % ip link show eth0:1 > > | RTNETLINK answers: No such device > > | Cannot send link get request: No such device > > > > Prior to the above commit, link lookup was performed via ifindex > > returned by if_nametoindex(). The latter uses SIOCGIFINDEX ioctl call > > which on kernel side causes the colon-suffix to be dropped before doing > > the interface lookup. Netlink API though doesn't care about that at all. > > To keep things backward compatible, mimick ioctl API behaviour and drop > > the colon-suffix prior to sending the RTM_GETLINK request. > > > > Fixes: 50b9950dd9011 ("link dump filter") > > Signed-off-by: Phil Sutter > > It is a regression, but the original code was kind of broken. > iproute2 doesn't need or want the old style alias interface notation. Thanks for your clarification! Cheers, Phil