diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -361,26 +361,15 @@ int32_t retval, nxt_pkt, tlen, off; int etype = 0; uint16_t drop_hdrlen; - uint8_t iptos, no_vn=0; + uint8_t iptos; inp = tptoinpcb(tp); INP_WLOCK_ASSERT(inp); NET_EPOCH_ASSERT(); - - if (m) - ifp = m_rcvif(m); - else - ifp = NULL; - if (ifp == NULL) { - /* - * We probably should not work around - * but kassert, since lro alwasy sets rcvif. - */ - no_vn = 1; - goto skip_vnet; - } + KASSERT(m != NULL, ("ctf_process_inbound_raw: m == NULL")); + ifp = m_rcvif(m); + KASSERT(ifp != NULL, ("ctf_process_inbound_raw: ifp == NULL")); CURVNET_SET(ifp->if_vnet); -skip_vnet: tcp_get_usecs(&tv); while (m) { m_save = m->m_nextpkt; @@ -466,18 +455,14 @@ m_freem(m); m = m_save; } - if (no_vn == 0) { - CURVNET_RESTORE(); - } + CURVNET_RESTORE(); INP_UNLOCK_ASSERT(inp); - return(retval); + return (retval); } skipped_pkt: m = m_save; } - if (no_vn == 0) { - CURVNET_RESTORE(); - } + CURVNET_RESTORE(); return (0); }