summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2006-02-23 16:16:28 +0000
committerEsben Norby <norby@cvs.openbsd.org>2006-02-23 16:16:28 +0000
commit59a218e2fe5d69a225b770bfc3cacb166d0295b4 (patch)
tree0c7970886b1bdd6fc9e6ab312a9067396f50a6a1
parent20663e0ec54fa8fdb665082a2860572255861543 (diff)
Prevent ospfd from crashing when LSA Ext's are changed.
ok claudio@
-rw-r--r--usr.sbin/ospfd/rde_lsdb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/rde_lsdb.c b/usr.sbin/ospfd/rde_lsdb.c
index 57cba114449..0f98c601a47 100644
--- a/usr.sbin/ospfd/rde_lsdb.c
+++ b/usr.sbin/ospfd/rde_lsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_lsdb.c,v 1.26 2006/02/15 11:47:40 norby Exp $ */
+/* $OpenBSD: rde_lsdb.c,v 1.27 2006/02/23 16:16:27 norby Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -345,7 +345,8 @@ lsa_add(struct rde_nbr *nbr, struct lsa *lsa)
if (old != NULL) {
if (!lsa_equal(new->lsa, old->lsa)) {
- nbr->area->dirty = 1;
+ if (lsa->hdr.type != LSA_TYPE_EXTERNAL)
+ nbr->area->dirty = 1;
start_spf_timer();
}
RB_REMOVE(lsa_tree, tree, old);
@@ -619,7 +620,8 @@ lsa_merge(struct rde_nbr *nbr, struct lsa *lsa, struct vertex *v)
free(v->lsa);
v->lsa = lsa;
start_spf_timer();
- nbr->area->dirty = 1;
+ if (lsa->hdr.type != LSA_TYPE_EXTERNAL)
+ nbr->area->dirty = 1;
/* set correct timeout for reflooding the LSA */
clock_gettime(CLOCK_MONOTONIC, &tp);