[quagga-dev 577] report: ospfd keep interface config

Paul Jakma paul at clubi.ie
Tue Dec 23 14:35:04 GMT 2003


Hi,

reposting this patch which causes ospfd to retain interface 
configuration information even if interface is removed. OSPF config 
info is, with this patch, only destroyed if the user explicitely 
configures 'no interface <iface>'.

Should be perfectly safe, but it'd be nice to get some more
widespread testing.

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
	warning: do not ever send email to spam at dishone.st
Fortune:
To get back on your feet, miss two car payments.
-------------- next part --------------
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_dump.c.1.3
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_interface.c.1.16
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_interface.h.1.1.1.2
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_te.c.1.2
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_vty.c.1.14
Only in /home/paul/cvs/zebra/quagga/ospfd/: .#ospf_zebra.c.1.12
Only in /home/paul/cvs/zebra/quagga/ospfd/: .cvsignore
Only in /home/paul/cvs/zebra/quagga/ospfd/: CVS
Binary files /home/paul/cvs/zebra/quagga/ospfd/libospf.a and ./quagga-0.96.4/ospfd/libospf.a differ
Only in /home/paul/cvs/zebra/quagga/ospfd/: ospf_dump.c.orig
Only in /home/paul/cvs/zebra/quagga/ospfd/: ospf_dump.c.rej
diff --exclude=ospfd.c --exclude='*~' --exclude=Makefile --exclude='*.Po' --exclude='*.o' -ur /home/paul/cvs/zebra/quagga/ospfd/ospf_interface.c ./quagga-0.96.4/ospfd/ospf_interface.c
--- /home/paul/cvs/zebra/quagga/ospfd/ospf_interface.c	2003-10-15 22:29:16.000000000 +0100
+++ ./quagga-0.96.4/ospfd/ospf_interface.c	2003-10-29 12:16:57.000000000 +0000
@@ -658,11 +658,18 @@
 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;
Only in /home/paul/cvs/zebra/quagga/ospfd/: ospf_snmp.c.orig
diff --exclude=ospfd.c --exclude='*~' --exclude=Makefile --exclude='*.Po' --exclude='*.o' -ur /home/paul/cvs/zebra/quagga/ospfd/ospf_zebra.c ./quagga-0.96.4/ospfd/ospf_zebra.c
--- /home/paul/cvs/zebra/quagga/ospfd/ospf_zebra.c	2003-10-27 21:44:36.000000000 +0000
+++ ./quagga-0.96.4/ospfd/ospf_zebra.c	2003-10-29 12:33:22.000000000 +0000
@@ -125,12 +125,6 @@
     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;
 }
 
Binary files /home/paul/cvs/zebra/quagga/ospfd/ospfd and ./quagga-0.96.4/ospfd/ospfd differ
Only in /home/paul/cvs/zebra/quagga/ospfd/: ospfd.c.orig
Only in /home/paul/cvs/zebra/quagga/ospfd/: ospfd.c.rej


More information about the Quagga-dev mailing list