diff options
author | ajs <ajs> | 2005-04-02 22:50:38 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-04-02 22:50:38 +0000 |
commit | a349198fd3e4e5692cdc91223f8153cb53c086ce (patch) | |
tree | e5b366a8ab7ab9ed1c9670faf1f18eef26877ade /zebra/if_ioctl_solaris.c | |
parent | f695b01ff8e9aebc46bdf41f104ad4abbb0ef59e (diff) | |
download | quagga-a349198fd3e4e5692cdc91223f8153cb53c086ce.tar.bz2 quagga-a349198fd3e4e5692cdc91223f8153cb53c086ce.tar.xz |
2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* if.h: (if_lookup_by_name_len, if_get_by_name_len) New functions.
* if.c: (if_lookup_by_name_len, if_get_by_name_len) New functions.
(if_get_by_name) Tighten up code.
(interface) Use new function if_get_by_name_len.
* zclient.c: (zebra_interface_add_read) Use new if_get_by_name_len
function.
(zebra_interface_state_read) Use new if_lookup_by_name_len function.
* kernel_socket.c: (ifm_read) Use new if_lookup_by_name_len function
to save a memcpy.
* if_ioctl_solaris.c: (interface_list_ioctl) Fix subtle bug with new
if_get_by_name_len function.
* ospf_interface.c: (ospf_vl_new) Use strnlen to fix call to if_create.
Diffstat (limited to 'zebra/if_ioctl_solaris.c')
-rw-r--r-- | zebra/if_ioctl_solaris.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c index 38ac5a71..aa01b073 100644 --- a/zebra/if_ioctl_solaris.c +++ b/zebra/if_ioctl_solaris.c @@ -138,7 +138,9 @@ calculate_lifc_len: /* must hold privileges to enter here */ for (n = 0; n < lifconf.lifc_len; n += sizeof (struct lifreq)) { - ifp = if_get_by_name (lifreq->lifr_name); + ifp = if_get_by_name_len(lifreq->lifr_name, + strnlen(lifreq->lifr_name, + sizeof(lifreq->lifr_name))); if (lifreq->lifr_addr.ss_family == AF_INET) ifp->flags |= IFF_IPV4; |