aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2010-01-06 16:48:59 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2010-01-06 16:48:59 +0000
commite932cea80a74e440b344754ddffa7a177443e236 (patch)
tree62f38f3de14a71ce570b8046acb7b21bcd579707
parent684a1497e21b20e85d54bc08e64bdf6b54bdf85c (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 d5fa6be37c87..961bdd6a867b 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2761,8 +2761,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)