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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 52355C282C2 for ; Thu, 7 Feb 2019 12:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 289702190C for ; Thu, 7 Feb 2019 12:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfBGMjl (ORCPT ); Thu, 7 Feb 2019 07:39:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:40006 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726769AbfBGMjl (ORCPT ); Thu, 7 Feb 2019 07:39:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 75F2EAFE2; Thu, 7 Feb 2019 12:39:40 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id A50A8E0142; Thu, 7 Feb 2019 13:39:39 +0100 (CET) Date: Thu, 7 Feb 2019 13:39:39 +0100 From: Michal Kubecek To: netdev@vger.kernel.org Cc: Phil Sutter , David Miller Subject: Re: [net-next PATCH] net: rtnetlink: Support alias interfaces with RTM_GETLINK Message-ID: <20190207123939.GE18410@unicorn.suse.cz> References: <20190207102438.21448-1-phil@nwl.cc> <20190207122728.GW26388@orbyte.nwl.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190207122728.GW26388@orbyte.nwl.cc> 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 On Thu, Feb 07, 2019 at 01:27:28PM +0100, Phil Sutter wrote: > On Thu, Feb 07, 2019 at 11:24:38AM +0100, Phil Sutter wrote: > > Align interface name handling regarding alias interfaces in > > rtnl_getlink() with dev_ioctl() treating SIOCGIFINDEX ioctl calls. The > > latter function strips any colon suffix before doing the interface > > lookup, do the same for RTM_GETLINK requests. > > After a second thought, I'll self-NACK this one: Given that netlink API > is completely unrelated to ioctl one, there is no inherent need to do > things the same way. Looking at RTM_NEWLINK handler, it seems possible > to create interface names containing a colon via netlink. Not since commit a4176a939186 ("net: reject creation of netdev names with colons") which disallowed using such names in general. But I still don't think it would be a good idea. It's bad enough that (as I just learned to my surprise) "ip link del dummy1:0" deletes dummy1 without any complaint because ip uses SIOCGIFINDEX ioctl for ifindex lookup. Michal Kubecek