From a730d82378d3cdf5356775ec0c23ad2ca40c5edb Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Tue, 20 Jul 2021 00:29:18 +0200 Subject: [PATCH] tcp: fix RACK and BBR when using VIMAGE enabled kernel Fix a bug in VNET handling, which occurs when using specific NICs. PR: 257195 Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D31212 --- sys/netinet/tcp_stacks/rack_bbr_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index baa267b43752..bf93359368f9 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -508,16 +508,18 @@ skip_vnet: m_freem(m); m = m_save; } - if (no_vn == 0) + if (no_vn == 0) { CURVNET_RESTORE(); + } INP_UNLOCK_ASSERT(inp); return(retval); } skipped_pkt: m = m_save; } - if (no_vn == 0) + if (no_vn == 0) { CURVNET_RESTORE(); + } return(retval); }