Module Name: src Committed By: christos Date: Wed Feb 5 20:09:33 UTC 2025
Modified Files: src/external/bsd/blocklist/bin: conf.c conf.h run.c Log Message: PR/19: robohack: log the conf line number with bad protocol errors. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/blocklist/bin/conf.c cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/conf.h \ src/external/bsd/blocklist/bin/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/blocklist/bin/conf.c diff -u src/external/bsd/blocklist/bin/conf.c:1.6 src/external/bsd/blocklist/bin/conf.c:1.7 --- src/external/bsd/blocklist/bin/conf.c:1.6 Fri Feb 9 10:15:32 2024 +++ src/external/bsd/blocklist/bin/conf.c Wed Feb 5 15:09:33 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.6 2024/02/09 15:15:32 christos Exp $ */ +/* $NetBSD: conf.c,v 1.7 2025/02/05 20:09:33 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: conf.c,v 1.6 2024/02/09 15:15:32 christos Exp $"); +__RCSID("$NetBSD: conf.c,v 1.7 2025/02/05 20:09:33 christos Exp $"); #include <stdio.h> #ifdef HAVE_LIBUTIL_H @@ -409,6 +409,8 @@ conf_parseline(const char *f, size_t l, { int e; + c->c_lineno = l; + while (*p && isspace((unsigned char)*p)) p++; Index: src/external/bsd/blocklist/bin/conf.h diff -u src/external/bsd/blocklist/bin/conf.h:1.1.1.1 src/external/bsd/blocklist/bin/conf.h:1.2 --- src/external/bsd/blocklist/bin/conf.h:1.1.1.1 Sun Jun 14 21:52:53 2020 +++ src/external/bsd/blocklist/bin/conf.h Wed Feb 5 15:09:33 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.h,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */ +/* $NetBSD: conf.h,v 1.2 2025/02/05 20:09:33 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -34,6 +34,7 @@ #include <sys/socket.h> struct conf { + size_t c_lineno; struct sockaddr_storage c_ss; int c_lmask; int c_port; Index: src/external/bsd/blocklist/bin/run.c diff -u src/external/bsd/blocklist/bin/run.c:1.1.1.1 src/external/bsd/blocklist/bin/run.c:1.2 --- src/external/bsd/blocklist/bin/run.c:1.1.1.1 Sun Jun 14 21:52:53 2020 +++ src/external/bsd/blocklist/bin/run.c Wed Feb 5 15:09:33 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: run.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */ +/* $NetBSD: run.c,v 1.2 2025/02/05 20:09:33 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: run.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $"); +__RCSID("$NetBSD: run.c,v 1.2 2025/02/05 20:09:33 christos Exp $"); #include <stdio.h> #ifdef HAVE_LIBUTIL_H @@ -131,7 +131,8 @@ run_change(const char *how, const struct prname = "udp"; break; default: - (*lfun)(LOG_ERR, "%s: bad protocol %d", __func__, c->c_proto); + (*lfun)(LOG_ERR, "%s: bad protocol %d (line %zu)", __func__, + c->c_proto, c->c_lineno); return -1; }