]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: fix flooding procedure
authorChristian Franke <chris@opensourcerouting.org>
Wed, 20 Feb 2013 10:00:54 +0000 (10:00 +0000)
committerDavid Lamparter <equinox@diac24.net>
Sat, 20 Apr 2013 04:14:27 +0000 (06:14 +0200)
An ospf router should accept a new maxage LSA into its lsdb if it has any
neighbors in state Exchange or Loading. ospfd would however only account
for neighbors on the same interface which does not seem to be a valid
optimization.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
ospfd/ospf_lsa.c
ospfd/ospf_lsa.h
ospfd/ospf_packet.c

index e0e05ab84adb7b5580cc82345bc9e604f30cab56..109a120b1f87c8d49e7abe9e4b75de50d58554ba 100644 (file)
@@ -2794,7 +2794,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
 }
 
 \f
-static int
+int
 ospf_check_nbr_status (struct ospf *ospf)
 {
   struct listnode *node, *nnode;
index 9ff2d92043ca056ab749218beb6d6ea7d8aab19c..c71877da4d31ad07f048835d399b1547c1520a6d 100644 (file)
@@ -251,6 +251,7 @@ extern u_int32_t lsa_seqnum_increment (struct ospf_lsa *);
 extern void lsa_header_set (struct stream *, u_char, u_char, struct in_addr,
                     struct in_addr);
 extern struct ospf_neighbor *ospf_nbr_lookup_ptop (struct ospf_interface *);
+extern int ospf_check_nbr_status (struct ospf *);
 
 /* Prototype for LSA primitive. */
 extern struct ospf_lsa *ospf_lsa_new (void);
index d3f1b5635fe2488d95a9217053771128e489efb3..37223fbb7b8582cac824a6d8a0d4c52520d5528b 100644 (file)
@@ -1833,8 +1833,7 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh,
         then take the following actions: */
 
       if (IS_LSA_MAXAGE (lsa) && !current &&
-         (ospf_nbr_count (oi, NSM_Exchange) +
-          ospf_nbr_count (oi, NSM_Loading)) == 0)
+         ospf_check_nbr_status(oi->ospf))
        {
          /* (4a) Response Link State Acknowledgment. */
          ospf_ls_ack_send (nbr, lsa);