summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-07-29 14:44:44 +0200
committerDavid Lamparter <equinox@diac24.net>2019-08-02 11:29:03 +0200
commitf1cf5af6dae136ead1f8233b61d245e7d67863ad (patch)
treea15c85025bf4154e38a2144e5b65aa458ff1dd90
parentbcbe98cca0b52ffd43d2bf49651ea5698390b691 (diff)
ospfd: don't ASE with router-ID 0
The ASEs will be generated later by ospf_external_lsa_rid_change(). Signed-off-by: David Lamparter <equinox@diac24.net>
-rw-r--r--ospfd/ospf_lsa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 7aa4a48d81..47327ad25c 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -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;