All of lore.kernel.org
 help / color / mirror / Atom feed
* Devices with colon in name (iproute2 bug)
@ 2010-11-18 12:14 Štefan Sakalík
  2010-11-18 13:25 ` Ben Hutchings
  0 siblings, 1 reply; 3+ messages in thread
From: Štefan Sakalík @ 2010-11-18 12:14 UTC (permalink / raw)
  To: netdev

Hi,
When I add a device with colon via ip (from git 3f5c1a01):
ip link add dev 'a:b' type dummy
then ip link show dev 'a:b' returns
12: a:b: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN
ioctl(SIOCGIFXQLEN) failed: No such device

link/ether 9e:44:b4:ec:77:f1 brd ff:ff:ff:ff:ff:ff

Also ifconfig from net-tools returns
a: error fetching interface information: Device not found
but I guess it's obsolete.

Regards,
-Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Devices with colon in name (iproute2 bug)
  2010-11-18 12:14 Devices with colon in name (iproute2 bug) Štefan Sakalík
@ 2010-11-18 13:25 ` Ben Hutchings
  2010-11-18 14:09   ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2010-11-18 13:25 UTC (permalink / raw)
  To: Štefan Sakalík; +Cc: netdev

On Thu, 2010-11-18 at 13:14 +0100, Štefan Sakalík wrote:
> Hi,
> When I add a device with colon via ip (from git 3f5c1a01):
> ip link add dev 'a:b' type dummy
> then ip link show dev 'a:b' returns
> 12: a:b: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN
> ioctl(SIOCGIFXQLEN) failed: No such device
> 
> link/ether 9e:44:b4:ec:77:f1 brd ff:ff:ff:ff:ff:ff
> 
> Also ifconfig from net-tools returns
> a: error fetching interface information: Device not found
> but I guess it's obsolete.

Linux originally only supported one address per address-family per
interface.  Additional addresses had to be assigned to 'alias
interfaces' which were named <base-interface>:<index>.  For backward
compatibility, colons in interface names are reserved for this purpose.
If you can create regular interfaces with colons in their names, this
seems to be a kernel bug.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Devices with colon in name (iproute2 bug)
  2010-11-18 13:25 ` Ben Hutchings
@ 2010-11-18 14:09   ` Eric Dumazet
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2010-11-18 14:09 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: Štefan Sakalík, netdev

Le jeudi 18 novembre 2010 à 13:25 +0000, Ben Hutchings a écrit :

> Linux originally only supported one address per address-family per
> interface.  Additional addresses had to be assigned to 'alias
> interfaces' which were named <base-interface>:<index>.  For backward
> compatibility, colons in interface names are reserved for this purpose.
> If you can create regular interfaces with colons in their names, this
> seems to be a kernel bug.

Yes

Speaking of kernel bug, many devices dont set operstate, while they
really are UP

-> UNKNOWN

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:21:70:b0:e4:89 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:23:4e:1a:49:2d brd ff:ff:ff:ff:ff:ff
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 3e:42:f7:21:de:e2 brd ff:ff:ff:ff:ff:ff
6: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-18 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 12:14 Devices with colon in name (iproute2 bug) Štefan Sakalík
2010-11-18 13:25 ` Ben Hutchings
2010-11-18 14:09   ` Eric Dumazet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.