diff options
| author | 2020-10-03 13:39:56 +0000 | |
|---|---|---|
| committer | 2020-10-03 13:39:56 +0000 | |
| commit | dc6b949cf56e9f444f7052cd1db2cacaa8519c54 (patch) | |
| tree | 11981d32c6f7082c62724b7e6976c411ef828a98 | |
| parent | There are lots of place where we want to redirect stdin, stdout (diff) | |
| download | wireguard-openbsd-dc6b949cf56e9f444f7052cd1db2cacaa8519c54.tar.xz wireguard-openbsd-dc6b949cf56e9f444f7052cd1db2cacaa8519c54.zip | |
The new intra area db entry has to be saved into the tree before
orig_intra_area_prefix_lsas() is called. If not, the ospf6d will not
announce the new intra area db for a newly learned link from another
ospf router of the broadcast domain.
OK denis@
| -rw-r--r-- | usr.sbin/ospf6d/rde_lsdb.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/usr.sbin/ospf6d/rde_lsdb.c b/usr.sbin/ospf6d/rde_lsdb.c index 2c89145d290..142fad1c1cc 100644 --- a/usr.sbin/ospf6d/rde_lsdb.c +++ b/usr.sbin/ospf6d/rde_lsdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_lsdb.c,v 1.45 2020/08/21 10:17:35 jan Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.46 2020/10/03 13:39:56 jan Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -467,6 +467,7 @@ lsa_add(struct rde_nbr *nbr, struct lsa *lsa) struct lsa_tree *tree; struct vertex *new, *old; struct timeval tv, now, res; + int update = 1; if (LSA_IS_SCOPE_AS(ntohs(lsa->hdr.type))) tree = &asext_tree; @@ -495,16 +496,13 @@ lsa_add(struct rde_nbr *nbr, struct lsa *lsa) fatal("lsa_add"); return (1); } - if (!lsa_equal(new->lsa, old->lsa)) { - if (ntohs(lsa->hdr.type) == LSA_TYPE_LINK) - orig_intra_area_prefix_lsas(nbr->area); - if (ntohs(lsa->hdr.type) != LSA_TYPE_EXTERNAL) - nbr->area->dirty = 1; - start_spf_timer(); - } + if (lsa_equal(new->lsa, old->lsa)) + update = 0; vertex_free(old); RB_INSERT(lsa_tree, tree, new); - } else { + } + + if (update) { if (ntohs(lsa->hdr.type) == LSA_TYPE_LINK) orig_intra_area_prefix_lsas(nbr->area); if (ntohs(lsa->hdr.type) != LSA_TYPE_EXTERNAL) |
