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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567744

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

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to