From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: network interfaces called "all", "default" or "config" Date: Fri, 15 Aug 2014 10:32:50 -0700 Message-ID: References: <20140723113314.GA7798@chaz.gmail.com> <53CFCD26.1020409@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Randy Dunlap , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" To: Stephane Chazelas Return-path: Received: from mail-la0-f46.google.com ([209.85.215.46]:45537 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbaHORcw (ORCPT ); Fri, 15 Aug 2014 13:32:52 -0400 Received: by mail-la0-f46.google.com with SMTP id b8so2585479lan.33 for ; Fri, 15 Aug 2014 10:32:50 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Aug 15, 2014 at 1:33 AM, Stephane Chazelas wrote: > Yes, I know those are also used for the eth0:1 "aliases", but the bug > is, since it is allowed to do > > ip link add link eth0 eth0:123 type vlan id 123 > > Then the > > ip link del link eth0 eth0:123 > > should be allowed as well. Or probably better to avoid confusion > > ip link add link eth0 foo:bar type vlan id 123 > > should not be allowed. > Good point! I think the reason is that in the past we used ioctl() to add or remove network interface so kernel just checks that code path for name alias, so we probably need to check netlink path as well since it makes really little sense that we allow create names with a colon but disallow to delete them. Stephen should know better than me.