Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/blacklist/bin Restart the loop each time we del...
details: https://anonhg.NetBSD.org/src/rev/61e540fc66ae
branches: trunk
changeset: 338974:61e540fc66ae
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 21 01:13:21 2015 +0000
description:
Restart the loop each time we delete an entry because the hash code does
not handle it well. Is that a db bug?
diffstat:
external/bsd/blacklist/bin/blacklistd.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 787a18608903 -r 61e540fc66ae external/bsd/blacklist/bin/blacklistd.c
--- a/external/bsd/blacklist/bin/blacklistd.c Sat Jun 20 19:58:40 2015 +0000
+++ b/external/bsd/blacklist/bin/blacklistd.c Sun Jun 21 01:13:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.32 2015/01/28 22:30:42 christos Exp $ */
+/* $NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistd.c,v 1.32 2015/01/28 22:30:42 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -284,6 +284,7 @@
return;
}
+again:
for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1;
f = 0, n++)
{
@@ -305,6 +306,7 @@
buf, c.c_lmask, c.c_port, c.c_duration);
}
state_del(state, &c);
+ goto again;
}
}
Home |
Main Index |
Thread Index |
Old Index