diff options
author | ajs <ajs> | 2005-04-02 22:50:38 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-04-02 22:50:38 +0000 |
commit | 5caf51b7e8bba51247905f3c470d87caf7c5fe96 (patch) | |
tree | c10f3e155a1e8744c1a5be4034515985316144b9 /ospfd/ospf_interface.c | |
parent | 14ccf58c68f8a1328f187384a2b498cda02155a0 (diff) | |
download | quagga-5caf51b7e8bba51247905f3c470d87caf7c5fe96.tar.bz2 quagga-5caf51b7e8bba51247905f3c470d87caf7c5fe96.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 'ospfd/ospf_interface.c')
-rw-r--r-- | ospfd/ospf_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index b76abe58..027dfb9d 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -880,8 +880,8 @@ ospf_vl_new (struct ospf *ospf, struct ospf_vl_data *vl_data) if (IS_DEBUG_OSPF_EVENT) zlog_debug ("ospf_vl_new(): creating pseudo zebra interface"); - snprintf (ifname, INTERFACE_NAMSIZ + 1, "VLINK%d", vlink_count); - vi = if_create (ifname, INTERFACE_NAMSIZ); + snprintf (ifname, sizeof(ifname), "VLINK%d", vlink_count); + vi = if_create (ifname, strnlen(ifname, sizeof(ifname))); co = connected_new (); co->ifp = vi; listnode_add (vi->connected, co); |