Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2025 21:17:10 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ea6376adc8b9 - main - tcp: improve name of function
Message-ID:  <202506272117.55RLHAFp026759@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

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

commit ea6376adc8b969936259537ed894213162b376e8
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-06-27 21:04:12 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-06-27 21:04:12 +0000

    tcp: improve name of function
    
    Let us call the function to compute the effetive MSL tcp_eff_msl()
    instead of just tcp_msl(). This avoids a conflict with !VIMAGE builds,
    since in that case there is a global variable with name tcp_msl.
    
    Reported by:    kp
    Fixes:          5fb4b091e835 ("tcp: allow specifying a MSL for local communications")
---
 sys/netinet/tcp_timewait.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 7c6c55909215..c095fc8f7765 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -112,7 +112,7 @@ SYSCTL_PROC(_net_inet_tcp, OID_AUTO, nolocaltimewait,
     "Do not create TCP TIME_WAIT state for local connections");
 
 static u_int
-tcp_msl(struct tcpcb *tp)
+tcp_eff_msl(struct tcpcb *tp)
 {
 	struct inpcb *inp = tptoinpcb(tp);
 #ifdef INET6
@@ -180,7 +180,7 @@ tcp_twstart(struct tcpcb *tp)
 		return;
 	}
 
-	tcp_timer_activate(tp, TT_2MSL, 2 * tcp_msl(tp));
+	tcp_timer_activate(tp, TT_2MSL, 2 * tcp_eff_msl(tp));
 	INP_WUNLOCK(inp);
 }
 
@@ -323,7 +323,7 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th,
 	if (thflags & TH_FIN) {
 		seq = th->th_seq + tlen + (thflags & TH_SYN ? 1 : 0);
 		if (seq + 1 == tp->rcv_nxt)
-			tcp_timer_activate(tp, TT_2MSL, 2 * tcp_msl(tp));
+			tcp_timer_activate(tp, TT_2MSL, 2 * tcp_eff_msl(tp));
 	}
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506272117.55RLHAFp026759>