diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-12-29 13:53:37 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-12-29 13:53:37 +0000 |
commit | 6d7fe3cf8a828561fe2bde07e0c06d8d9ddf1f10 (patch) | |
tree | 2ce444919e8edacfb2c707cf445c963758757dd3 /usr.sbin/ospfd/ospfe.c | |
parent | 2ca2908e55b127ccb757644ccaad6d6203f003ad (diff) |
Instead of a simple timer per neighbor for the LS retransmition list use
a timewheel. All LSA updates are now first added to the queue and sent out
later. This makes it possible to cluster multiple LSA updates into on OSPF
packet. This gives a massive speedup when large databases need to be synced.
Tested and OK norby@
Diffstat (limited to 'usr.sbin/ospfd/ospfe.c')
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 40c2db820b9..f8ea9d59df2 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.35 2005/12/15 20:30:44 claudio Exp $ */ +/* $OpenBSD: ospfe.c,v 1.36 2005/12/29 13:53:36 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -485,15 +485,14 @@ ospfe_dispatch_rde(int fd, short event, void *bula) break; memcpy(&age, imsg.data, sizeof(age)); - if (ntohs(age) >= MAX_AGE) { + ref = lsa_cache_add(imsg.data, l); + if (ntohs(age) >= MAX_AGE) /* add to retransmit list */ - ref = lsa_cache_add(imsg.data, l); - ls_retrans_list_add(nbr, imsg.data); - lsa_cache_put(ref, nbr); - } + ls_retrans_list_add(nbr, imsg.data, 0, 0); + else + ls_retrans_list_add(nbr, imsg.data, 0, 1); - /* send direct don't add to retransmit list */ - send_ls_update(nbr->iface, nbr->addr, imsg.data, l); + lsa_cache_put(ref, nbr); break; case IMSG_LS_ACK: /* |