summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2008-09-07 11:38:30 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2008-09-07 11:38:30 +0000
commitc4982fae5930a7a57160d9eeff35cfcf34a09633 (patch)
treead7e9647fa2a698d33e67787008eed1c03cb33e7 /sys/netinet/tcp_output.c
parent1b856fa4912c9cf1e6b74000d7e2e9e304424b4c (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 1e6e53e1c254..75f3038d6c85 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -392,7 +392,7 @@ after_sack_rexmit:
}
/* len will be >= 0 after this point. */
- KASSERT(len >= 0, ("%s: len < 0", __func__));
+ KASSERT(len >= 0, ("[%s:%d]: len < 0", __func__, __LINE__));
/*
* Automatic sizing of send socket buffer. Often the send buffer
@@ -746,6 +746,12 @@ send:
/*#endif*/
/*
+ * This KASSERT is here to catch edge cases at a well defined place.
+ * Before, those had triggered (random) panic conditions further down.
+ */
+ KASSERT(len >= 0, ("[%s:%d]: len < 0", __func__, __LINE__));
+
+ /*
* Grab a header mbuf, attaching a copy of data to
* be transmitted, and initialize the header from
* the template for sends on this connection.