netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Martín Ferrari" <martin.ferrari@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Subject: Re: Bug handling devices with weird names
Date: Thu, 8 Jul 2010 10:27:47 -0700	[thread overview]
Message-ID: <20100708102747.66d0ad78@s6510> (raw)
In-Reply-To: <AANLkTinBvzfdiAldJkXfH_vOkCv_cK7hBhjmH1l2vHTd@mail.gmail.com>

On Thu, 8 Jul 2010 19:08:07 +0200
Martín Ferrari <martin.ferrari@gmail.com> wrote:

> According to dev_valid_name (net/core/dev.c), a valid device name is
> one that doesn't include spaces, slashes, and is not "." or "..". But
> if I create a device called "foo:", some operations fail:
> 
> # ip link add name foo: type dummy
> # ip link list foo:
> 155: foo:: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN ioctl(SIOCGIFXQLEN)
> failed: No such device
> 
>     link/ether 92:7f:4d:0d:8f:57 brd ff:ff:ff:ff:ff:ff
> 
> Strace reveals that the problem occurs when executing an ioctl:
> 
> ioctl(4, SIOCGIFTXQLEN, {ifr_name="foo:", ???}) = -1 ENODEV (No such device)
> 
> ifconfig gets completely lost, of course:
> 
> $ /sbin/ifconfig foo:
> foo:: error fetching interface information: Device not found
> 
> ioctl(5, SIOCGIFFLAGS, {ifr_name="foo:", ???}) = -1 ENODEV (No such device)
> 
> 
> So, is this fixable or iproute should stop using the ioctl interface?
> (dunno if netlink provides everything already)

Colons are used for the old IP aliasing. IP aliasing was an older way of handling
multiple addresses per interface, and is not necessary anymore. The syntax is
retained for legacy compatibility.

  reply	other threads:[~2010-07-08 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 17:08 Bug handling devices with weird names Martín Ferrari
2010-07-08 17:27 ` Stephen Hemminger [this message]
2010-07-09 10:04   ` Martín Ferrari
2010-07-09 10:19     ` Eric Dumazet
2010-07-09 15:41       ` Martín Ferrari
2010-07-09 16:14         ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708102747.66d0ad78@s6510 \
    --to=shemminger@vyatta.com \
    --cc=martin.ferrari@gmail.com \
    --cc=mathieu.lacage@sophia.inria.fr \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).