diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-06 17:06:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-06 17:06:45 +0000 |
commit | 6b9104e190b8c030c1d44562a060f447f659554a (patch) | |
tree | ee2543ea656185f9c01fa080210372c03d55e7cd | |
parent | 2cc256f97c1b789dc568732eb4a97a6a34f20fdf (diff) |
I should have read the RFC more carefully.
...if only one of the instances has its LS age field set to MaxAge
The important part is "only one", so check if both LSA are at MaxAge and
in that case return 0 -- the LSAs are identical.
This fixes a super nasty doom loop between two ospfd sending each other
LSA updates at an incredible speed. Tested and OK norby@
-rw-r--r-- | usr.sbin/ospfd/rde_lsdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde_lsdb.c b/usr.sbin/ospfd/rde_lsdb.c index 3e6bcd52914..6b63afd5cbf 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.19 2005/08/08 12:22:48 claudio Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.20 2005/10/06 17:06:44 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -133,6 +133,8 @@ lsa_newer(struct lsa_hdr *a, struct lsa_hdr *b) a16 = ntohs(a->age); b16 = ntohs(b->age); + if (a16 >= MAX_AGE && b16 >= MAX_AGE) + return (0); if (b16 >= MAX_AGE) return (-1); if (a16 >= MAX_AGE) |