Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 May 2024 17:58:56 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: df9de82f54d1 - main - tcp: fix sending RST after second inp lookup
Message-ID:  <202405251758.44PHwuRw077506@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=df9de82f54d13aa077889349e15d9bf7794a1e6f

commit df9de82f54d13aa077889349e15d9bf7794a1e6f
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-05-25 17:46:33 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-05-25 17:58:48 +0000

    tcp: fix sending RST after second inp lookup
    
    When we first find an inp, we set also the tp. If then a second
    lookup is necessary, the inp is recomputed. If this fails, the
    tp is not cleared, which resulted in failing KASSERT.
    Therefore, clear the tp when staring the inp lookup procedure.
    Reported by:    Jenkins
    Fixes:          02d15215cef2 ("tcp: improve blackhole support")
    MFC after:      1 week
    Sponsored by:   Netflix, Inc.
---
 sys/netinet/tcp_input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 08ff84039c90..7faa815fc1ac 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -833,6 +833,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port)
 	    ((thflags & (TH_ACK|TH_SYN)) == TH_SYN ?
 	    INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB);
 findpcb:
+	tp = NULL;
 #ifdef INET6
 	if (isipv6 && fwd_tag != NULL) {
 		struct sockaddr_in6 *next_hop6;



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