summaryrefslogtreecommitdiff
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index bd944ae748..7e6146e0d3 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -166,7 +166,7 @@ static int ospf_interface_delete(int command, struct zclient *zclient,
if (rn->info)
ospf_if_free((struct ospf_interface *)rn->info);
- ifp->ifindex = IFINDEX_DELETED;
+ if_set_index(ifp, IFINDEX_INTERNAL);
return 0;
}
@@ -179,8 +179,7 @@ static struct interface *zebra_interface_if_lookup(struct stream *s,
stream_get(ifname_tmp, s, INTERFACE_NAMSIZ);
/* And look it up. */
- return if_lookup_by_name_len(
- ifname_tmp, strnlen(ifname_tmp, INTERFACE_NAMSIZ), vrf_id);
+ return if_lookup_by_name(ifname_tmp, vrf_id);
}
static int ospf_interface_state_up(int command, struct zclient *zclient,
@@ -1134,12 +1133,16 @@ void ospf_distribute_list_update(struct ospf *ospf, int type,
/* External info does not exist. */
ext = ospf_external_lookup(type, instance);
- if (!ext || !(rt = EXTERNAL_INFO(ext)))
+ if (!ext || !(rt = EXTERNAL_INFO(ext))) {
+ XFREE(MTYPE_OSPF_DIST_ARGS, args);
return;
+ }
/* If exists previously invoked thread, then let it continue. */
- if (ospf->t_distribute_update)
+ if (ospf->t_distribute_update) {
+ XFREE(MTYPE_OSPF_DIST_ARGS, args);
return;
+ }
/* Set timer. */
ospf->t_distribute_update = NULL;