summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-11-12 00:06:27 +0000
committerLaurent Bercot <ska@appnovation.com>2023-11-12 00:06:27 +0000
commite58d005e2a579cf51d191e8f53eea98fb5bda7aa (patch)
tree45caf8539150a8b031870362850477244fe38a5c
parent24d1860868682d33f60970119b1cff1bf088a497 (diff)
downloads6-networking-e58d005e2a579cf51d191e8f53eea98fb5bda7aa.tar.xz
s6-tcpserverd: change terminology: allow -> accept, deny -> reject
Also change ip:port to ip_port in logs Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/conn-tools/s6-tcpserverd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conn-tools/s6-tcpserverd.c b/src/conn-tools/s6-tcpserverd.c
index 1cd7007..5b35301 100644
--- a/src/conn-tools/s6-tcpserverd.c
+++ b/src/conn-tools/s6-tcpserverd.c
@@ -113,7 +113,7 @@ static void log_status (void)
strerr_warni3x("status: ", fmt, fmtmaxconn) ;
}
-static inline void log_deny (char const *ip, uint16_t port, uint32_t num)
+static inline void log_reject (char const *ip, uint16_t port, uint32_t num)
{
char fmtip[IP46_FMT] ;
char fmtport[UINT16_FMT] ;
@@ -122,7 +122,7 @@ static inline void log_deny (char const *ip, uint16_t port, uint32_t num)
fmtip[is6 ? ip6_fmt(fmtip, ip) : ip4_fmt(fmtip, ip)] = 0 ;
fmtport[uint16_fmt(fmtport, port)] = 0 ;
fmtnum[uint32_fmt(fmtnum, num)] = 0 ;
- strerr_warni7sys("deny ", fmtip, ":", fmtport, " count ", fmtnum, fmtlocalmaxconn) ;
+ strerr_warni7sys("reject ", fmtip, "_", fmtport, " count ", fmtnum, fmtlocalmaxconn) ;
}
static inline void log_accept (pid_t pid, char const *ip, uint16_t port, uint32_t num)
@@ -136,7 +136,7 @@ static inline void log_accept (pid_t pid, char const *ip, uint16_t port, uint32_
fmtport[uint16_fmt(fmtport, port)] = 0 ;
fmtnum[uint32_fmt(fmtnum, num)] = 0 ;
fmtpid[pid_fmt(fmtpid, pid)] = 0 ;
- strerr_warni9x("allow ", fmtip, ":", fmtport, " pid ", fmtpid, " count ", fmtnum, fmtlocalmaxconn) ;
+ strerr_warni9x("accept ", fmtip, "_", fmtport, " pid ", fmtpid, " count ", fmtnum, fmtlocalmaxconn) ;
}
static inline void log_close (pid_t pid, char const *ip, int w, uint32_t num)
@@ -247,7 +247,7 @@ static inline void new_connection (int s, char const *ip, uint16_t port, char co
uint32_t num = avltreen_search(by_ip, ip, &d) ? *NUMP(d) : 0 ;
if (num >= localmaxconn)
{
- log_deny(ip, port, num) ;
+ log_reject(ip, port, num) ;
return ;
}