From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbaHOIdy (ORCPT ); Fri, 15 Aug 2014 04:33:54 -0400 Received: from mail-yh0-f48.google.com ([209.85.213.48]:62459 "EHLO mail-yh0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbaHOIdw (ORCPT ); Fri, 15 Aug 2014 04:33:52 -0400 MIME-Version: 1.0 In-Reply-To: References: <20140723113314.GA7798@chaz.gmail.com> <53CFCD26.1020409@infradead.org> Date: Fri, 15 Aug 2014 09:33:51 +0100 Message-ID: Subject: Re: network interfaces called "all", "default" or "config" From: Stephane Chazelas To: Cong Wang Cc: Randy Dunlap , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Worse: ip link add link eth0 foo:bar type vlan id 1 ip link add link eth0 foo type vlan id 2 ip link del foo:bar deletes foo instead of foo:bar. On 14 August 2014 19:37, Cong Wang wrote: > On Thu, Aug 14, 2014 at 2:41 AM, Stephane Chazelas > wrote: >> By the way, this is related: >> >> $ ip link add link eth0 eth0:123 type vlan id 123 >> $ ip link del link eth0 eth0:123 >> RTNETLINK answers: Operation not supported > > Kernel reads "eth0:123" as an alias of "eth0", so it will just > truncate the dev name into "eth0": > > > ifr.ifr_name[IFNAMSIZ-1] = 0; > > colon = strchr(ifr.ifr_name, ':'); > if (colon) > *colon = 0;