summaryrefslogtreecommitdiff
path: root/isisd/isis_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_zebra.c')
-rw-r--r--isisd/isis_zebra.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 40743b29..0f8d1162 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -95,30 +95,28 @@ isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length)
zlog_debug ("Zebra I/F delete: %s index %d flags %ld metric %d mtu %d",
ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
- if_delete (ifp);
+
+ /* Cannot call if_delete because we should retain the pseudo interface
+ in case there is configuration info attached to it. */
+ if_delete_retain(ifp);
isis_csm_state_change (IF_DOWN_FROM_Z, circuit_scan_by_ifp (ifp), ifp);
+ ifp->ifindex = IFINDEX_INTERNAL;
+
return 0;
}
static struct interface *
zebra_interface_if_lookup (struct stream *s)
{
- struct interface *ifp;
u_char ifname_tmp[INTERFACE_NAMSIZ];
/* Read interface name. */
stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
- /* Lookup this by interface index. */
- ifp = if_lookup_by_name ((char *) ifname_tmp);
-
- /* If such interface does not exist, indicate an error */
- if (!ifp)
- return NULL;
-
- return ifp;
+ /* And look it up. */
+ return if_lookup_by_name ((char *) ifname_tmp);
}
static int