git: bbd1d17ff339 - stable/13 - tcp bblog: use correct length
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 20:27:46 UTC
The branch stable/13 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=bbd1d17ff339f43159f79fce9bd68a85520b81a7
commit bbd1d17ff339f43159f79fce9bd68a85520b81a7
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-03-27 13:31:48 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-08-01 20:27:09 +0000
tcp bblog: use correct length
The length of tldl_reason is TCP_LOG_REASON_LEN, not TCP_LOG_ID_LEN.
No functional change intended.
Reported by: Coverity Scan
CID: 1418074
CID: 1418276
Reviewed by: glebius, rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D44510
(cherry picked from commit ed505f893ab08aa61e2a1046ae54df357a108260)
---
sys/netinet/tcp_log_buf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c
index 27b587f6ec9a..f51adf09391a 100644
--- a/sys/netinet/tcp_log_buf.c
+++ b/sys/netinet/tcp_log_buf.c
@@ -2234,7 +2234,7 @@ tcp_log_dump_tp_logbuf(struct tcpcb *tp, char *reason, int how, bool force)
if (reason != NULL)
strlcpy(entry->tldl_reason, reason, TCP_LOG_REASON_LEN);
else
- strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_ID_LEN);
+ strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_REASON_LEN);
entry->tldl_ie = inp->inp_inc.inc_ie;
if (inp->inp_inc.inc_flags & INC_ISIPV6)
entry->tldl_af = AF_INET6;
@@ -2324,7 +2324,7 @@ tcp_log_dump_node_logbuf(struct tcp_log_id_node *tln, char *reason, int how)
if (reason != NULL)
strlcpy(entry->tldl_reason, reason, TCP_LOG_REASON_LEN);
else
- strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_ID_LEN);
+ strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_REASON_LEN);
entry->tldl_ie = tln->tln_ie;
entry->tldl_entries = tln->tln_entries;
entry->tldl_count = tln->tln_count;