git: f9d3c2a44353 - stable/14 - ipfilter: Print the hash name when adding a hashnode fails

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Tue, 19 Nov 2024 00:26:48 UTC
The branch stable/14 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=f9d3c2a44353f3d987b5443d6fc30ee270ea0061

commit f9d3c2a44353f3d987b5443d6fc30ee270ea0061
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-11-07 15:51:12 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-11-19 00:26:04 +0000

    ipfilter: Print the hash name when adding a hashnode fails
    
    As with when printing errors for failed poolnodes, printing the hash
    node (IP address) only leads to speculation which hash pool the failed
    add occurred. This is especially useful when the same IP address is
    listed in multiple hash pools.
    
    (cherry picked from commit 8aae4220d76602f22291d7567ba0c61b9aa8c188)
---
 sbin/ipf/libipf/load_hashnode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c
index 11525dc96e35..bf22edb9be87 100644
--- a/sbin/ipf/libipf/load_hashnode.c
+++ b/sbin/ipf/libipf/load_hashnode.c
@@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl,
 		if (!(opts & OPT_DONOTHING)) {
 			char msg[80];
 
-			snprintf(msg, sizeof(msg), "%s node from lookup hash table", what);
+			snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name);
 			return (ipf_perror_fd(pool_fd(), iocfunc, msg));
 		}
 	return (0);