diff options
author | ajs <ajs> | 2005-04-02 23:05:56 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-04-02 23:05:56 +0000 |
commit | 5fb11a02bb35d59ca2cee278e076be44399cdc17 (patch) | |
tree | b192a425a0a9e33abed6b5ce0783996d5f5cb081 /lib/if.c | |
parent | 5caf51b7e8bba51247905f3c470d87caf7c5fe96 (diff) | |
download | quagga-5fb11a02bb35d59ca2cee278e076be44399cdc17.tar.bz2 quagga-5fb11a02bb35d59ca2cee278e076be44399cdc17.tar.xz |
2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* if.c: (if_nametoindex) The man page is rather vague, but it seems
like the argument to if_nametoindex has an implicit maximum length
of IFNAMSIZ characters.
Diffstat (limited to 'lib/if.c')
-rw-r--r-- | lib/if.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -768,7 +768,8 @@ if_nametoindex (const char *name) { struct interface *ifp; - return ((ifp = if_lookup_by_name(name)) != NULL) ? ifp->ifindex : 0; + return ((ifp = if_lookup_by_name_len(name, strnlen(name, IFNAMSIZ))) != NULL) + ? ifp->ifindex : 0; } #endif |