Vendor import of blocklist 2025-10-26 (ff13526)

Upstream hash ff13526654d8cae3f90aacde2f64023ea1916c2d.

Obtained from:	https://github.com/zoulasc/blocklist
This commit is contained in:
Jose Luis Duran
2025-10-27 12:43:42 +00:00
parent 1ae0b2f3a2
commit df549a8042
3 changed files with 13 additions and 9 deletions
+6 -2
View File
@@ -1,4 +1,4 @@
.\" $NetBSD: blocklistctl.8,v 1.5 2025/10/25 16:56:27 christos Exp $
.\" $NetBSD: blocklistctl.8,v 1.6 2025/10/26 13:49:22 christos Exp $
.\"
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 27, 2025
.Dd October 25, 2025
.Dt BLOCKLISTCTL 8
.Os
.Sh NAME
@@ -82,6 +82,10 @@ sub-command consists of a header (unless
was given) and one line for each record in the database, where each line
has the following columns:
.Bl -tag -width indent
.It Ql rulename
The packet filter rule name associated with the database entry,
usually
.Dv blocklistd .
.It Ql address/ma:port
The remote address, mask, and local port number of the client connection
associated with the database entry.
+4 -4
View File
@@ -1,4 +1,4 @@
/* $NetBSD: blocklistd.c,v 1.11 2025/10/25 16:55:23 christos Exp $ */
/* $NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: blocklistd.c,v 1.11 2025/10/25 16:55:23 christos Exp $");
__RCSID("$NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -329,8 +329,8 @@ update(void)
(*lfun)(LOG_INFO, "released %s/%d:%d after %d seconds",
buf, c.c_lmask, c.c_port, c.c_duration);
}
state_del(state, &c);
goto again;
if (state_del(state, &c) == 0)
goto again;
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
/* $NetBSD: state.c,v 1.2 2025/02/11 17:48:30 christos Exp $ */
/* $NetBSD: state.c,v 1.3 2025/10/25 18:43:51 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: state.c,v 1.2 2025/02/11 17:48:30 christos Exp $");
__RCSID("$NetBSD: state.c,v 1.3 2025/10/25 18:43:51 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -131,7 +131,7 @@ state_del(DB *db, const struct conf *c)
(*lfun)(LOG_DEBUG, "%s: returns %d", __func__, rv);
(*db->sync)(db, 0);
}
return 0;
return rv;
default:
(*lfun)(LOG_ERR, "%s: failed (%m)", __func__);
return -1;