And then rebuild and install a new kernel:
KK=`sysctl -n kern.osversion | cut -d# -f1`
cd /usr/src/sys/arch/`machine`/compile/$KK
make obj
make config
make
make install
+#define TCP_SACKHOLE_LIMIT 128 /* SACK holes per connection at receiver side */
+
/*
* Process the TCP SACK option. tp->snd_holes is an ordered list
* of holes (oldest to newest, in terms of the sequence space).
@@ -2492,6 +2494,8 @@ tcp_sack_option(struct tcpcb *tp, struct
* ACKs some data in middle of a hole; need to
* split current hole
*/
+ if (tp->snd_numholes >= TCP_SACKHOLE_LIMIT)
+ goto done;
temp = (struct sackhole *)
pool_get(&sackhl_pool, PR_NOWAIT);
if (temp == NULL)
@@ -2519,6 +2523,8 @@ tcp_sack_option(struct tcpcb *tp, struct
* Need to append new hole at end.
* Last hole is p (and it's not NULL).
*/
+ if (tp->snd_numholes >= TCP_SACKHOLE_LIMIT)
+ goto done;
temp = (struct sackhole *)
pool_get(&sackhl_pool, PR_NOWAIT);
if (temp == NULL)