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:
Gleb Smirnoff 2014-05-05 21:33:20 +00:00
parent 90fdc1c6c2
commit 6c42c8a93f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265393

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);
}