git: 4f3a0c719780 - main - TCP RACK: don't use an uninitialized variable

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Tue, 31 Dec 2024 16:28:55 UTC
The branch main has been updated by tuexen:

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

commit 4f3a0c719780fdd57c660ceb353bbc71fc555600
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-12-31 16:26:04 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-12-31 16:26:04 +0000

    TCP RACK: don't use an uninitialized variable
    
    When storing the old beta values in rack_swap_beta_values(),
    ensure that the newreno_flags field is initialized appropriately
    instead of using an uninitialized value.
    Since the stored newreno_flags aren't actually used, this fix
    should not have any functional change.
    
    Reviewed by:            rrs
    CID:                    1523796
    MFC after:              1 week
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D48260
---
 sys/netinet/tcp_stacks/rack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index da68060dd1d2..ef2554926734 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -642,6 +642,7 @@ rack_swap_beta_values(struct tcp_rack *rack, uint8_t flex8)
 		failed = 2;
 		goto out;
 	}
+	old.newreno_flags = CC_NEWRENO_BETA_ECN_ENABLED;
 	/* Get the current values out */
 	sopt.sopt_valsize = sizeof(struct cc_newreno_opts);
 	sopt.sopt_dir = SOPT_GET;