mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
tcp: add some debug output
Also log, when dropping text or FIN after having received a FIN.
This is the intended behavior described in RFC 9293.
A follow-up patch will enforce this behavior for the base stack
and the RACK stack.
Reviewed by: rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D44669
(cherry picked from commit e8c149ab85)
This commit is contained in:
parent
90cde57af8
commit
5344772af9
1 changed files with 29 additions and 0 deletions
|
|
@ -3251,6 +3251,35 @@ dodata: /* XXX */
|
|||
len = so->so_rcv.sb_hiwat;
|
||||
#endif
|
||||
} else {
|
||||
if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
|
||||
if (tlen > 0) {
|
||||
if ((thflags & TH_FIN) != 0) {
|
||||
log(LOG_DEBUG, "%s; %s: %s: "
|
||||
"Received %d bytes of data and FIN "
|
||||
"after having received a FIN, "
|
||||
"just dropping both\n",
|
||||
s, __func__,
|
||||
tcpstates[tp->t_state], tlen);
|
||||
} else {
|
||||
log(LOG_DEBUG, "%s; %s: %s: "
|
||||
"Received %d bytes of data "
|
||||
"after having received a FIN, "
|
||||
"just dropping it\n",
|
||||
s, __func__,
|
||||
tcpstates[tp->t_state], tlen);
|
||||
}
|
||||
} else {
|
||||
if ((thflags & TH_FIN) != 0) {
|
||||
log(LOG_DEBUG, "%s; %s: %s: "
|
||||
"Received FIN "
|
||||
"after having received a FIN, "
|
||||
"just dropping it\n",
|
||||
s, __func__,
|
||||
tcpstates[tp->t_state]);
|
||||
}
|
||||
}
|
||||
free(s, M_TCPLOG);
|
||||
}
|
||||
m_freem(m);
|
||||
thflags &= ~TH_FIN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue