From 21fefa9843f6e8fc2263e8d85cf0d072b4b6c242 Mon Sep 17 00:00:00 2001 From: ajs Date: Sat, 2 Apr 2005 23:16:41 +0000 Subject: 2005-04-02 Andrew J. Schorr * ospf_zebra.c: (zebra_interface_if_lookup) Must use if_lookup_by_name_len. --- ospfd/ChangeLog | 5 +++++ ospfd/ospf_zebra.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index e8eae90e..d84d54b3 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,8 @@ +2005-04-02 Andrew J. Schorr + + * ospf_zebra.c: (zebra_interface_if_lookup) Must use + if_lookup_by_name_len. + 2005-04-02 Andrew J. Schorr * ospf_interface.c: (ospf_vl_new) Use strnlen to fix call to if_create. diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 74936df9..27299c59 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -148,13 +148,14 @@ ospf_interface_delete (int command, struct zclient *zclient, static struct interface * zebra_interface_if_lookup (struct stream *s) { - u_char ifname_tmp[INTERFACE_NAMSIZ]; + char ifname_tmp[INTERFACE_NAMSIZ]; /* Read interface name. */ stream_get (ifname_tmp, s, INTERFACE_NAMSIZ); /* And look it up. */ - return if_lookup_by_name ((char *) ifname_tmp); + return if_lookup_by_name_len(ifname_tmp, + strnlen(ifname_tmp, INTERFACE_NAMSIZ)); } int -- cgit v1.2.1