From 59a218e2fe5d69a225b770bfc3cacb166d0295b4 Mon Sep 17 00:00:00 2001 From: Esben Norby Date: Thu, 23 Feb 2006 16:16:28 +0000 Subject: Prevent ospfd from crashing when LSA Ext's are changed. ok claudio@ --- usr.sbin/ospfd/rde_lsdb.c | 8 +++++--- 1 file 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 @@ -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); -- cgit v1.2.3