This isn't a simple problem at all.

The new naming scheme from systemd makes it so that these specific
devices (USB dongles) get their MAC address encoded in the device name,
which brings it up to a length of 15 characters + \0; so 16 bytes. This
happens to also be the size limit for interface names (set as IFNAMSIZ
to 16). Adding more characters to the end of this string makes it too
long to be allowed by {libnl3, kernel, iproute2}. This is because while
we're not strictly dealing with interface names here, we're dealing with
a label which is bound by the same sized buffer (limited to IFNAMSIZ
size).

There are a few possible avenues for a solution:
 - Rename the address yourself to something smaller. This should be possible 
using udev rules.
 - Fix systemd to pick a different naming method.
 - Fix ip addr to better deal with address labels, which may mean dropping some 
backward compatibility (more below)
 - Increasing the buffer size for address labels (which means changes in the 
kernel, libnl, iproute2 at the very least, and probably many more userland 
utilities).

For iproute2:
       label LABEL
              Each address may be tagged with a label string.  In order to 
preserve compatibility with Linux-2.0 net aliases, this string must coincide 
with the name of the device
              or must be prefixed with the device name followed by colon.
It may be possible to strip out anything before the colon if a label is passed 
in that format to hand to the netlink layer a shorter label, but I haven't 
looked more closely at what such a change might impact.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to iproute2 in Ubuntu.
https://bugs.launchpad.net/bugs/1567744

Title:
  RTNETLINK answers: Numerical result out of range for alias interface
  from a usb NIC

Status in iproute2 package in Ubuntu:
  Incomplete

Bug description:
  I have a USB NIC that is connected to my denial system. I tried to
  create an alias, and after reboot, it wasn't created. When I manually
  try to bring it up I have the error.

  /e/n/i:

  auto enx000ec688b79f
  iface enx000ec688b79f inet static
          address 10.90.90.1
          netmask 255.255.255.0

  auto enx000ec688b79f:1
  iface enx000ec688b79f:1 inet static
          address 192.168.100.1
          netmask 255.255.255.0

  ubuntu@maas00:~$ sudo ifup enx000ec688b79f
  ubuntu@maas00:~$ sudo ifup enx000ec688b79f:1
  RTNETLINK answers: Numerical result out of range
  Failed to bring up enx000ec688b79f:1.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iproute2/+bug/1567744/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to