git: 2fb53436cd05 - main - tcp md5: fix accounting of ACK with bad signatures

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Fri, 04 Sep 2026 07:29:14 UTC
The branch main has been updated by tuexen:

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

commit 2fb53436cd05f65164d166ef3ab33660fe451470
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-09-04 07:24:40 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-09-04 07:28:35 +0000

    tcp md5: fix accounting of ACK with bad signatures
    
    When processing the ACK of the initial TCP handshake using the
    SYN cookie, don't increment the counter for unexpected
    signatures (tcps_sig_err_sigopt). The correct
    counter (tcps_sig_rcvbadsig) for bad signatures is already
    incremented in TCPMD5_INPUT().
    
    Reported by:            Hannes Elfert
    Reviewed by:            rscheff
    MFC after:              1 week
    MFC to:                 stable/14
    MFC to:                 stable/15
    Differential Revision:  https://reviews.freebsd.org/D59302
---
 sys/netinet/tcp_syncache.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 1b7e03e4ff79..3a447703b628 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1169,7 +1169,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
 				    s, __func__);
 				free(s, M_TCPLOG);
 			}
-			TCPSTAT_INC(tcps_sig_err_sigopt);
 			return (-1); /* Do not send RST */
 		}
 #endif /* TCP_SIGNATURE */