]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: don't suppress empty router LSA
authorDinesh Dutt <ddutt@cumulusnetworks.com>
Sat, 24 Aug 2013 07:55:43 +0000 (07:55 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 8 Nov 2013 02:15:43 +0000 (18:15 -0800)
Currently in OSPFv3 implementation, if all the interfaces are down/loopback
or are without any full adjacencies, the router LSA is suppressed. So for
a router with only stub networks, no router LSA is generated. However,
intra-prefix LSAs are generated for the stub networks and these intra-prefix
LSAs will reference the router LSA. So the router LSA really should not be
suppressed. It needs to be generated to be the starting vertex for SPF
w.r.t the stub networks.

Signed-off-by: James Li <jli at cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospf6d/ospf6_intra.c

index 86f414606039d60cf16ac2e624cce97c9b7455d2..4cb751f01d10e0e3b1762c9c50f47ec64ed55287 100644 (file)
@@ -272,35 +272,26 @@ ospf6_router_lsa_originate (struct thread *thread)
         /* xxx */
     }
 
         /* xxx */
     }
 
-  if ((caddr_t) lsdesc != (caddr_t) router_lsa +
-                          sizeof (struct ospf6_router_lsa))
-    {
-      /* Fill LSA Header */
-      lsa_header->age = 0;
-      lsa_header->type = htons (OSPF6_LSTYPE_ROUTER);
-      lsa_header->id = htonl (link_state_id);
-      lsa_header->adv_router = oa->ospf6->router_id;
-      lsa_header->seqnum =
-        ospf6_new_ls_seqnum (lsa_header->type, lsa_header->id,
-                             lsa_header->adv_router, oa->lsdb);
-      lsa_header->length = htons ((caddr_t) lsdesc - (caddr_t) buffer);
-
-      /* LSA checksum */
-      ospf6_lsa_checksum (lsa_header);
-
-      /* create LSA */
-      lsa = ospf6_lsa_create (lsa_header);
-
-      /* Originate */
-      ospf6_lsa_originate_area (lsa, oa);
-
-      link_state_id ++;
-    }
-  else
-    {
-      if (IS_OSPF6_DEBUG_ORIGINATE (ROUTER))
-        zlog_debug ("Nothing to describe in Router-LSA, suppress");
-    }
+  /* Fill LSA Header */
+  lsa_header->age = 0;
+  lsa_header->type = htons (OSPF6_LSTYPE_ROUTER);
+  lsa_header->id = htonl (link_state_id);
+  lsa_header->adv_router = oa->ospf6->router_id;
+  lsa_header->seqnum =
+    ospf6_new_ls_seqnum (lsa_header->type, lsa_header->id,
+                         lsa_header->adv_router, oa->lsdb);
+  lsa_header->length = htons ((caddr_t) lsdesc - (caddr_t) buffer);
+
+  /* LSA checksum */
+  ospf6_lsa_checksum (lsa_header);
+
+  /* create LSA */
+  lsa = ospf6_lsa_create (lsa_header);
+
+  /* Originate */
+  ospf6_lsa_originate_area (lsa, oa);
+
+  link_state_id ++;
 
   /* Do premature-aging of rest, undesired Router-LSAs */
   type = ntohs (OSPF6_LSTYPE_ROUTER);
 
   /* Do premature-aging of rest, undesired Router-LSAs */
   type = ntohs (OSPF6_LSTYPE_ROUTER);