diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-19 09:11:09 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-07-19 09:11:09 +0000 |
commit | a8c883e9825f1cb7dfe957cf04668a0d2f53b174 (patch) | |
tree | 8d435d997206dbd496531a9fec14f8649183ce02 /usr.sbin/ospfd/rde_lsdb.c | |
parent | 33fadc901f86dae8d19e33fcb965c153c65ad3d3 (diff) |
lsa_refresh() was able to resurect dead LSA resulting in zombie anouncements.
Make sure that if the LSA is managed by this router that we force timed-out
LSA to stay timed out which causes them to be pruned in the secound round.
This problem can show up when not exactly the same LSA is pruned because
the checksum is used as tiebreaker resulting in indeterministic selection
of which LSA is considered newer.
OK bluhm@, sthen@
Diffstat (limited to 'usr.sbin/ospfd/rde_lsdb.c')
-rw-r--r-- | usr.sbin/ospfd/rde_lsdb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/rde_lsdb.c b/usr.sbin/ospfd/rde_lsdb.c index df30c01e91a..650235b91cc 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.43 2009/11/12 22:29:15 claudio Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.44 2010/07/19 09:11:08 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -626,7 +626,11 @@ lsa_refresh(struct vertex *v) u_int16_t len; /* refresh LSA by increasing sequence number by one */ - v->lsa->hdr.age = htons(DEFAULT_AGE); + if (v->self && ntohs(v->lsa->hdr.age) >= MAX_AGE) + /* self originated network that is currently beeing removed */ + v->lsa->hdr.age = htons(MAX_AGE); + else + v->lsa->hdr.age = htons(DEFAULT_AGE); seqnum = ntohl(v->lsa->hdr.seq_num); if (seqnum++ == MAX_SEQ_NUM) /* XXX fix me */ @@ -776,7 +780,7 @@ lsa_equal(struct lsa *a, struct lsa *b) return (0); if (a->hdr.opts != b->hdr.opts) return (0); - /* LSA with age MAX_AGE are never equal */ + /* LSAs with age MAX_AGE are never equal */ if (a->hdr.age == htons(MAX_AGE) || b->hdr.age == htons(MAX_AGE)) return (0); if (memcmp(&a->data, &b->data, ntohs(a->hdr.len) - |