Message ID | alpine.DEB.2.00.1203031007180.22132@bakacsin.ki.iif.hu |
---|---|
State | Changes Requested, archived |
Delegated to: | stephen hemminger |
Headers | show |
On 03.03.2012 13:18, Kiss Gabor (Bitman) wrote: > Dear folks, > > For a while I did not understand why I get > "RTNETLINK answers: Numerical result out of range" > message when adding more addresses to an interface. Shouldn't the kernel return more appropriate (IMHO) ENAMETOOLONG error code here? /mjt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, 3 Mar 2012 10:18:01 +0100 (CET) "Kiss Gabor (Bitman)" <kissg@ssg.ki.iif.hu> wrote: > Dear folks, > > For a while I did not understand why I get > "RTNETLINK answers: Numerical result out of range" > message when adding more addresses to an interface. > > The attached patch may help some peoples to avoid wasting > time with investigating this strange error. :-) > > Regards > > Gabor There are many values limited to 16 characters, this is an API restriction back to BSD days (see IFNAMSIZ). The man page could mention this, but it is well known limitation. The manpage idea is good, but don't reference net/if.h since somebody might get the idea that is the only thing that needs to change to allow longer names. Just state that interface names are limited to 15 characters (need to account for the nul at end). -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- ip.8.orig 2012-03-03 09:56:03.505518778 +0100 +++ ip.8 2012-03-03 10:06:17.685519961 +0100 @@ -1103,6 +1103,13 @@ this string must coincide with the name of the device or must be prefixed with the device name followed by colon. +Note: +.I NAME +must be shorter than +.BR IF_NAMESIZE +(usually 16) characters. That is defined in +.BR "/usr/include/net/if.h" . + .TP .BI scope " SCOPE_VALUE" the scope of the area where this address is valid.