The branch main has been updated by tuexen:

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

commit 94acddd2ad0142221124c3fb7fe3778a5a1f8036
Author:     Michael Tuexen <tue...@freebsd.org>
AuthorDate: 2025-04-03 06:59:46 +0000
Commit:     Michael Tuexen <tue...@freebsd.org>
CommitDate: 2025-04-03 06:59:46 +0000

    tcp: improve initializing the fields in tcp_log_buffer
    
    Initialize the fields in the tcp_log_buffer in the sequence they
    appear in the structure and add the initialization of tlb_flex1,
    tlb_flex2, and _pad[].
    
    Reviewed by:            rrs, Peter Lei
    MFC after:              3 days
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D49652
---
 sys/netinet/tcp_log_buf.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c
index 7b937958a4fb..e9ad05382b81 100644
--- a/sys/netinet/tcp_log_buf.c
+++ b/sys/netinet/tcp_log_buf.c
@@ -1857,16 +1857,21 @@ retry:
        COPY_STAT_T(rttvar);
        COPY_STAT(rcv_up);
        COPY_STAT(rcv_adv);
+       COPY_STAT_T(flags2);
        COPY_STAT(rcv_nxt);
        COPY_STAT(rcv_wnd);
        COPY_STAT_T(dupacks);
        COPY_STAT_T(segqlen);
        COPY_STAT(snd_numholes);
-       COPY_STAT(snd_scale);
-       COPY_STAT(rcv_scale);
-       COPY_STAT_T(flags2);
+       log_buf->tlb_flex1 = 0;
+       log_buf->tlb_flex2 = 0;
        COPY_STAT_T(fbyte_in);
        COPY_STAT_T(fbyte_out);
+       COPY_STAT(snd_scale);
+       COPY_STAT(rcv_scale);
+       log_buf->_pad[0] = 0;
+       log_buf->_pad[1] = 0;
+       log_buf->_pad[2] = 0;
 #undef COPY_STAT
 #undef COPY_STAT_T
        /* Copy stack-specific info. */

Reply via email to