X-Git-Url: https://git.saurik.com/apple/ipsec.git/blobdiff_plain/5122e997b817982e567ac8959bcb3aa7a6dd5cf7..d1e348cfd503b08e7d34b7683d23aae209af0a71:/ipsec-tools/racoon/throttle.c?ds=sidebyside diff --git a/ipsec-tools/racoon/throttle.c b/ipsec-tools/racoon/throttle.c index 73f6b92..3a5dcb4 100644 --- a/ipsec-tools/racoon/throttle.c +++ b/ipsec-tools/racoon/throttle.c @@ -1,4 +1,6 @@ -/* $Id: throttle.c,v 1.2 2004/11/30 07:40:13 manubsd Exp $ */ +/* $NetBSD: throttle.c,v 1.4 2006/09/09 16:22:10 manu Exp $ */ + +/* Id: throttle.c,v 1.5 2006/04/05 20:54:50 manubsd Exp */ /* * Copyright (C) 2004 Emmanuel Dreyfus @@ -49,6 +51,7 @@ #include #include +#include #include "vmbuf.h" #include "misc.h" @@ -100,14 +103,15 @@ throttle_host(addr, authfail) now = time(NULL); +restart: TAILQ_FOREACH_REVERSE(te, &throttle_list, throttle_list, next) { - /* - * Remove outdated entries - */ + /* + * Remove outdated entries + */ if (te->penalty < now) { TAILQ_REMOVE(&throttle_list, te, next); racoon_free(te); - continue; + goto restart; } if (cmpsaddrwop(addr, (struct sockaddr *)&te->host) == 0) {