ospfd: Remember network LSA sequence numbers across up/downs of an interface
* ospf_interface.h: (struct ospf_if_params) add field for saved network LSA
seqnum
* ospf_interfa.c: (ospf_new_if_params) init network_lsa_seqnum field to
initial seqnum - doesnt matter though.
* ospf_lsa.c: (ospf_network_lsa_new) check for any saved sequence number,
and use if it exists. Save the result back. This should help avoid needless
round of LSUpdate/LSRequests when a neighbour has to tell the originator
"uhm, i have something newer than that already".
* ospf_vty.c: (show_ip_ospf_interface_sub) Show the saved network LSA seqnum
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index ab0b758..f495c49 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -73,6 +73,9 @@
DECLARE_IF_PARAM (struct list *, auth_crypt); /* List of Auth cryptographic data. */
DECLARE_IF_PARAM (int, auth_type); /* OSPF authentication type */
+
+ /* Other, non-configuration state */
+ u_int32_t network_lsa_seqnum; /* Network LSA seqnum */
};
enum
@@ -167,6 +170,7 @@
/* Configured varables. */
struct ospf_if_params *params;
+
u_int32_t crypt_seqnum; /* Cryptographic Sequence Number */
u_int32_t output_cost; /* Acutual Interface Output Cost */