]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #12317 from mobash-rasool/ospf-fixes
authorRuss White <russ@riw.us>
Thu, 24 Nov 2022 15:21:25 +0000 (10:21 -0500)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2022 15:21:25 +0000 (10:21 -0500)
ospfd: Fix RFC conformance test cases 25.19 and 27.6

lib/libospf.h
ospfd/ospf_lsa.c

index c8ada9d3c52fb69b66cd0a9ae2965860283c2413..161c7635d8816b2e3cbb8bd4352910906487ce2d 100644 (file)
@@ -52,6 +52,7 @@ extern "C" {
 #define OSPF_DEFAULT_DESTINATION        0x00000000      /* 0.0.0.0 */
 #define OSPF_INITIAL_SEQUENCE_NUMBER    0x80000001U
 #define OSPF_MAX_SEQUENCE_NUMBER        0x7fffffffU
+#define OSPF_INVALID_SEQUENCE_NUMBER 0x80000000U
 
 /* OSPF Interface Types */
 #define OSPF_IFTYPE_NONE               0
index a67b6c6c19586e352174f3686ea85513878df42b..92558e3c51ab51420016d019821e5120f0b424d0 100644 (file)
@@ -3648,6 +3648,7 @@ void ospf_flush_self_originated_lsas_now(struct ospf *ospf)
        struct ospf_interface *oi;
        struct ospf_lsa *lsa;
        struct route_node *rn;
+       struct ospf_if_params *oip;
        int need_to_flush_ase = 0;
 
        ospf->inst_shutdown = 1;
@@ -3680,6 +3681,12 @@ void ospf_flush_self_originated_lsas_now(struct ospf *ospf)
                                ospf_lsa_flush_area(oi->network_lsa_self, area);
                                ospf_lsa_unlock(&oi->network_lsa_self);
                                oi->network_lsa_self = NULL;
+
+                               oip = ospf_lookup_if_params(
+                                       oi->ifp, oi->address->u.prefix4);
+                               if (oip)
+                                       oip->network_lsa_seqnum = htonl(
+                                               OSPF_INVALID_SEQUENCE_NUMBER);
                        }
 
                        if (oi->type != OSPF_IFTYPE_VIRTUALLINK