Skip to content

Commit b502a45

Browse files
committed
blocklist: blacklist: Chase recent upstream changes
Upstream introduced a fix that avoids blocklistd(8) from running into an endless loop when it tries to delete an address from the database which has been added multiple times. Apply the same fix to blacklistd(8). Upstream PR: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57193 MFC after: 2 days
1 parent 2c82cdd commit b502a45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/blocklist/bin/blacklistd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: blocklistd.c,v 1.11 2025/10/25 16:55:23 christos Exp $ */
1+
/* $NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $ */
22

33
/*-
44
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
3535
#ifdef HAVE_SYS_CDEFS_H
3636
#include <sys/cdefs.h>
3737
#endif
38-
__RCSID("$NetBSD: blocklistd.c,v 1.11 2025/10/25 16:55:23 christos Exp $");
38+
__RCSID("$NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $");
3939

4040
#include <sys/types.h>
4141
#include <sys/socket.h>
@@ -329,8 +329,8 @@ update(void)
329329
(*lfun)(LOG_INFO, "released %s/%d:%d after %d seconds",
330330
buf, c.c_lmask, c.c_port, c.c_duration);
331331
}
332-
state_del(state, &c);
333-
goto again;
332+
if (state_del(state, &c) == 0)
333+
goto again;
334334
}
335335
}
336336

0 commit comments

Comments
 (0)