diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-12 19:32:47 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-12 19:32:47 +0000 |
commit | 688e938998d7cd153e787bb600806b0df2315826 (patch) | |
tree | b63d0569bcadcf7ddf9e264409dd45491fc2a3ec | |
parent | a2742402bc50ee9a06198af57522a52ef3890e21 (diff) |
Don't fatal in case no root node was found for spf calculation.
The area may be empty because there is no active interface.
OK norby@
-rw-r--r-- | usr.sbin/ospfd/rde_spf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c index 632a2d6e3e9..bd03a9597ff 100644 --- a/usr.sbin/ospfd/rde_spf.c +++ b/usr.sbin/ospfd/rde_spf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_spf.c,v 1.10 2005/05/05 15:27:34 claudio Exp $ */ +/* $OpenBSD: rde_spf.c,v 1.11 2005/05/12 19:32:46 claudio Exp $ */ /* * Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -116,7 +116,9 @@ spf_calc(struct area *area) /* initialize SPF tree */ if ((v = spf_root = lsa_find(area, LSA_TYPE_ROUTER, rde_router_id(), rde_router_id())) == NULL) - fatalx("spf_calc: cannot find self originated router LSA"); + /* empty area because no interface is active */ + return; + area->transit = 0; spf_root->cost = 0; w = NULL; |