summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2008-11-06 12:33:33 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2008-11-06 12:33:33 +0000
commit6f01cac68a4d37f06209f31aaefacd7c2d423ff3 (patch)
tree23028e8a4ea6fd86cc680fe5bbeb4b3926ea904d
parentc3c1513719b4a85b570d3ae3d1e30968c1dc046b (diff)
Notes
-rw-r--r--sys/netinet/tcp_input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 1e59c1baff60..9dd7b8c625ec 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2847,8 +2847,16 @@ tcp_mss_update(struct tcpcb *tp, int offer, struct hc_metrics_lite *metricptr)
/*
* No route to sender, stay with default mss and return.
*/
- if (maxmtu == 0)
+ if (maxmtu == 0) {
+ /*
+ * In case we return early we need to intialize metrics
+ * to a defined state as tcp_hc_get() would do for us
+ * if there was no cache hit.
+ */
+ if (metricptr != NULL)
+ bzero(metricptr, sizeof(struct hc_metrics_lite));
return;
+ }
/* Check the interface for TSO capabilities. */
if (mtuflags & CSUM_TSO)