summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornorby <norby@openbsd.org>2006-02-23 16:16:27 +0000
committernorby <norby@openbsd.org>2006-02-23 16:16:27 +0000
commita0afe12aa0de21a22a75a38400df726a8a1390d2 (patch)
treec391e5c42b33a174df267f8427adb0602fc7b26d
parentRework the LSA cache and make it behave. Until now we only used the type, (diff)
downloadwireguard-openbsd-a0afe12aa0de21a22a75a38400df726a8a1390d2.tar.xz
wireguard-openbsd-a0afe12aa0de21a22a75a38400df726a8a1390d2.zip
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);