From 2be32b7bc1bcf95b95f8b3b9fd8e65e8d45336f3 Mon Sep 17 00:00:00 2001
From: paul <paul>
Date: Fri, 21 Mar 2003 15:11:58 +0000
Subject: Fix assert in ospf_api where interface is not configured in ospf.

---
 ospfd/ospf_apiserver.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index fc0713b0..90ca230f 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -2131,7 +2131,12 @@ ospf_apiserver_del_if (struct interface *ifp)
 	     ifp->ifindex);
 
   oi = ospf_apiserver_if_lookup_by_ifp (ifp);
-  assert (oi);
+
+  if (!oi) {
+    /* This interface is known to Zebra but not to OSPF daemon
+       anymore. No need to tell clients about it */
+    return 0;
+  }
 
   /* Interface deleted, tell clients about it */
   if (listcount (apiserver_list) > 0) {
-- 
cgit v1.2.1