summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2004-02-17 20:07:30 +0000
committerpaul <paul>2004-02-17 20:07:30 +0000
commit940b01aa6a8d9a2dd12fd121a39f9b53d23081ad (patch)
treeae20e672855d840076d0f4fb531586c8f8160e8d
parent6ad23f05e36e743b89fc5a9a41e3db7eccb917fb (diff)
2004-02-17 Paul Jakma <paul@dishone.st>
* ospf_zebra.c: (ospf_interface_delete) Do not delete the interface params, nor the interface structure, if an interface delete message is received from zebra. * ospf_interface.c: (ospf_if_delete_hook) Delete the interface params and interface, ie that which was previously removed in (ospf_interface_delete) above.
-rw-r--r--ospfd/ChangeLog9
-rw-r--r--ospfd/ospf_interface.c7
-rw-r--r--ospfd/ospf_zebra.c6
3 files changed, 16 insertions, 6 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index b2a5ad2e..6c8955a3 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,12 @@
+2004-02-17 Paul Jakma <paul@dishone.st>
+
+ * ospf_zebra.c: (ospf_interface_delete) Do not delete the interface
+ params, nor the interface structure, if an interface delete
+ message is received from zebra.
+ * ospf_interface.c: (ospf_if_delete_hook) Delete the interface
+ params and interface, ie that which was previously removed in
+ (ospf_interface_delete) above.
+
2004-02-11 Hasso Tepper <hasso@estpak.ee>
* ospf_interface.c, ospf_zebra.c: Don't attempt to read path->oi->ifp
if oi doesn't exist any more.
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 2f94b43f..acce9076 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -677,11 +677,18 @@ int
ospf_if_delete_hook (struct interface *ifp)
{
int rc = 0;
+ struct route_node *rn;
#ifdef HAVE_OPAQUE_LSA
rc = ospf_opaque_del_if (ifp);
#endif /* HAVE_OPAQUE_LSA */
+
route_table_finish (IF_OIFS (ifp));
+
+ for (rn = route_top (IF_OIFS_PARAMS (ifp)); rn; rn = route_next (rn))
+ if (rn->info)
+ ospf_del_if_params (rn->info);
route_table_finish (IF_OIFS_PARAMS (ifp));
+
ospf_del_if_params ((struct ospf_if_params *) IF_DEF_PARAMS (ifp));
XFREE (MTYPE_OSPF_IF_INFO, ifp->info);
ifp->info = NULL;
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 0910a506..e3738bed 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -125,12 +125,6 @@ ospf_interface_delete (int command, struct zclient *zclient,
if (rn->info)
ospf_if_free ((struct ospf_interface *) rn->info);
- for (rn = route_top (IF_OIFS_PARAMS (ifp)); rn; rn = route_next (rn))
- if (rn->info)
- ospf_del_if_params (rn->info);
-
- if_delete (ifp);
-
return 0;
}