svn commit: r358023 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Mon Feb 17 14:54:22 UTC 2020
Author: tuexen
Date: Mon Feb 17 14:54:21 2020
New Revision: 358023
URL: https://svnweb.freebsd.org/changeset/base/358023
Log:
Don't use uninitialised stack memory if the sysctl variable
net.inet.tcp.hostcache.enable is set to 0.
The bug resulted in using possibly a too small MSS value or wrong
initial retransmission timer settings. Possibly the value used
for ssthresh was also wrong.
Submitted by: Richard Scheffenegger
Reviewed by: Cheng Cui, rgrimes@, tuexen@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23687
Modified:
head/sys/netinet/tcp_hostcache.c
Modified: head/sys/netinet/tcp_hostcache.c
==============================================================================
--- head/sys/netinet/tcp_hostcache.c Mon Feb 17 13:31:30 2020 (r358022)
+++ head/sys/netinet/tcp_hostcache.c Mon Feb 17 14:54:21 2020 (r358023)
@@ -437,8 +437,10 @@ tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_
{
struct hc_metrics *hc_entry;
- if (!V_tcp_use_hostcache)
+ if (!V_tcp_use_hostcache) {
+ bzero(hc_metrics_lite, sizeof(*hc_metrics_lite));
return;
+ }
/*
* Find the right bucket.
More information about the svn-src-all
mailing list