diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-24 20:54:34 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-24 20:54:34 +0000 |
commit | 9e6922c4f2ab274c1deb3ec49e66afaa5597782f (patch) | |
tree | 494cc991cd410f449d4517a4454efbda690ec5f1 /usr.sbin/ospfd/rde_lsdb.c | |
parent | e7c92f433d72c0f2c1e121ab26db2f070ca0ac83 (diff) |
An lsa with age == MAX_AGE is always different and needs to be merged.
This solves a bug that made it impossible to remove a LSA by premature aging.
OK norby@
Diffstat (limited to 'usr.sbin/ospfd/rde_lsdb.c')
-rw-r--r-- | usr.sbin/ospfd/rde_lsdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde_lsdb.c b/usr.sbin/ospfd/rde_lsdb.c index 5239f7b2cac..90cc0af8db1 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.15 2005/05/24 07:13:00 claudio Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.16 2005/05/24 20:54:33 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -584,6 +584,7 @@ lsa_merge(struct rde_nbr *nbr, struct lsa *lsa, struct vertex *v) /* compare LSA most header fields are equal so don't check them */ if (lsa->hdr.len == v->lsa->hdr.len && lsa->hdr.opts == v->lsa->hdr.opts && + lsa->hdr.age != htons(MAX_AGE) && memcmp(&lsa->data, &v->lsa->data, ntohs(lsa->hdr.len) - sizeof(struct lsa_hdr)) == 0) { free(lsa); |