[quagga-dev 3103] Re: bugs related to length of interface names

Paul Jakma paul at clubi.ie
Sun Apr 3 21:04:39 BST 2005

On Sat, 2 Apr 2005, Andrew J. Schorr wrote:

> OK, I added these 2 new functions: if_lookup_by_name_len, and 
> if_get_by_name_len.  Note that the 2nd argument should be the 
> actual length of the interface name being passed, not the maximum 
> length. So typical invocations will use strnlen to calculate the 
> 2nd argument.


> I have fixed occurrences in lib, and some in zebra.  But basically 
> we now need to audit all uses of if_lookup_by_name and 
> if_get_by_name and fix them.


> interfaces.  For example, I don't know what is correct for the 
> various *BSD interfaces.  Also, for netlink, is it guaranteed that 
> interface names are always terminated with a '\0' char?  Or is 
> there a buffer length limitation?

I dont know.

Solaris I can check.

> Does that make sense?


Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Seeing is believing.  You wouldn't have seen it if you hadn't believed it.

More information about the Quagga-dev mailing list