The tcp_log_addrs() uses th pointer, which points into the mbuf, thus we

can not free the mbuf before tcp_log_addrs().

Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
This commit is contained in:
glebius 2014-05-05 21:33:20 +00:00
parent 4c0632abf4
commit 9f8ba75695

View File

@ -144,7 +144,6 @@ tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m)
V_tcp_reass_overflows++;
TCPSTAT_INC(tcps_rcvmemdrop);
m_freem(m);
*tlenp = 0;
if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL,
NULL))) {
@ -152,6 +151,7 @@ tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m)
"segment dropped\n", s, __func__);
free(s, M_TCPLOG);
}
m_freem(m);
return (0);
}