From 7eb5b47e54169ac0da40ed1a6760db5d5f915a4d Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Tue, 13 Oct 2009 16:13:13 +0100 Subject: 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 --- ospfd/ospf_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_interface.c') diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index b3336589..a812dd90 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -531,6 +531,8 @@ ospf_new_if_params (void) oip->auth_crypt = list_new (); + oip->network_lsa_seqnum = htonl(OSPF_INITIAL_SEQUENCE_NUMBER); + return oip; } @@ -569,7 +571,8 @@ ospf_free_if_params (struct interface *ifp, struct in_addr addr) !OSPF_IF_PARAM_CONFIGURED (oip, type) && !OSPF_IF_PARAM_CONFIGURED (oip, auth_simple) && !OSPF_IF_PARAM_CONFIGURED (oip, auth_type) && - listcount (oip->auth_crypt) == 0) + listcount (oip->auth_crypt) == 0 && + ntohl (oip->network_lsa_seqnum) != OSPF_INITIAL_SEQUENCE_NUMBER) { ospf_del_if_params (oip); rn->info = NULL; -- cgit v1.2.3