]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: don't ASE with router-ID 0
authorDavid Lamparter <equinox@diac24.net>
Mon, 29 Jul 2019 12:44:44 +0000 (14:44 +0200)
committerDavid Lamparter <equinox@diac24.net>
Fri, 2 Aug 2019 09:29:03 +0000 (11:29 +0200)
The ASEs will be generated later by ospf_external_lsa_rid_change().

Signed-off-by: David Lamparter <equinox@diac24.net>
ospfd/ospf_lsa.c

index 7aa4a48d81858adb3f64a7de974fd74bf0d064f4..47327ad25c465cbd7d32825f2549dea3148e6d7a 100644 (file)
@@ -1979,6 +1979,13 @@ struct ospf_lsa *ospf_external_lsa_originate(struct ospf *ospf,
 
           */
 
+       if (ospf->router_id.s_addr == 0) {
+               if (IS_DEBUG_OSPF_EVENT)
+                       zlog_debug("LSA[Type5:%pI4]: deferring AS-external-LSA origination, router ID is zero",
+                                  &ei->p.prefix);
+               return NULL;
+       }
+
        /* Check the AS-external-LSA should be originated. */
        if (!ospf_redistribute_check(ospf, ei, NULL))
                return NULL;