Always bump tcpstat.tcps_badrst if we get a RST for a connection in the

syncache that has an invalid SEQ instead of only doing it when we suceed
in mallocing space for the log message.

MFC after:	1 week
Reviewed by:	sam, bz
This commit is contained in:
John Baldwin 2008-05-08 22:21:09 +00:00
parent 7ed8ac61e6
commit 790fce68dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178862

View File

@ -567,10 +567,11 @@ syncache_chkrst(struct in_conninfo *inc, struct tcphdr *th)
"connection attempt aborted by remote endpoint\n",
s, __func__);
tcpstat.tcps_sc_reset++;
} else if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
log(LOG_DEBUG, "%s; %s: RST with invalid SEQ %u != IRS %u "
"(+WND %u), segment ignored\n",
s, __func__, th->th_seq, sc->sc_irs, sc->sc_wnd);
} else {
if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
log(LOG_DEBUG, "%s; %s: RST with invalid SEQ %u != "
"IRS %u (+WND %u), segment ignored\n",
s, __func__, th->th_seq, sc->sc_irs, sc->sc_wnd);
tcpstat.tcps_badrst++;
}