diff options
author | jhb <jhb@FreeBSD.org> | 2008-05-08 22:21:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-05-08 22:21:09 +0000 |
commit | 2e695d33bd9de0cbbb71b8c7dcd1ac7a5dc8966f (patch) | |
tree | 1b74d68a898c29beab83208134ab5be91a8c5c82 /sys/netinet | |
parent | a3093bf89c1ab4383c19579a6535daddcc4b82e2 (diff) | |
download | FreeBSD-src-2e695d33bd9de0cbbb71b8c7dcd1ac7a5dc8966f.zip FreeBSD-src-2e695d33bd9de0cbbb71b8c7dcd1ac7a5dc8966f.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 4bb7bcb..d5694f3 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -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++; } |