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:
jhb 2008-05-08 22:21:09 +00:00
parent a3093bf89c
commit 2e695d33bd

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