Move the tp set back to where it was before

we started playing with the VNET sets. This
way we have verified the INP settings before
we go to the trouble of de-referencing it.

Reviewed by:	and suggested by lstewart
Sponsored by:	Netflix Inc.
This commit is contained in:
Randall Stewart 2018-06-19 05:28:14 +00:00
parent cc11473037
commit f923a734b3

View File

@ -1158,7 +1158,6 @@ tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv)
hpts->p_inp = inp; hpts->p_inp = inp;
drop_reason = inp->inp_hpts_drop_reas; drop_reason = inp->inp_hpts_drop_reas;
inp->inp_in_input = 0; inp->inp_in_input = 0;
tp = intotcpcb(inp);
mtx_unlock(&hpts->p_mtx); mtx_unlock(&hpts->p_mtx);
CURVNET_SET(inp->inp_vnet); CURVNET_SET(inp->inp_vnet);
if (drop_reason) { if (drop_reason) {
@ -1183,6 +1182,7 @@ tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv)
mtx_lock(&hpts->p_mtx); mtx_lock(&hpts->p_mtx);
continue; continue;
} }
tp = intotcpcb(inp);
if ((tp == NULL) || (tp->t_inpcb == NULL)) { if ((tp == NULL) || (tp->t_inpcb == NULL)) {
goto out; goto out;
} }