Re: network interfaces called "all", "default" or "config"

From: Cong Wang
Date: Fri Aug 15 2014 - 13:33:02 EST


On Fri, Aug 15, 2014 at 1:33 AM, Stephane Chazelas
<stephane.chazelas@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/