git: 17ac6b1c1407 - main - bbr: drop packet synchronously in ctf_do_dropwithreset_conn()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 Dec 2021 16:49:29 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=17ac6b1c1407c7ca6a99c632416378a563b2c366 commit 17ac6b1c1407c7ca6a99c632416378a563b2c366 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2021-12-26 16:48:06 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2021-12-26 16:48:06 +0000 bbr: drop packet synchronously in ctf_do_dropwithreset_conn() This function is always called from tcp_do_segment() method, that can drop tcpcb and return unlocked. Reviewed by: rrs, tuexen Differential revision: https://reviews.freebsd.org/D33367 --- sys/netinet/tcp_stacks/rack_bbr_common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index 42225dfced2f..1be426927073 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -969,11 +969,10 @@ ctf_do_dropwithreset_conn(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen) { - if (tp->t_inpcb) { - tcp_set_inp_to_drop(tp->t_inpcb, ETIMEDOUT); - } tcp_dropwithreset(m, th, tp, tlen, rstreason); - INP_WUNLOCK(tp->t_inpcb); + tp = tcp_drop(tp, ETIMEDOUT); + if (tp) + INP_WUNLOCK(tp->t_inpcb); } uint32_t