diff options
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7717e06..91c90d8 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -125,6 +125,10 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW, &drop_synfin, 0, "Drop TCP packets with SYN+FIN set"); #endif +static int tcp_do_rfc3042 = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, + &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)"); + struct inpcbhead tcb; #define tcb6 tcb /* for KAME src sync over BSD*'s */ struct inpcbinfo tcbinfo; @@ -1760,6 +1764,16 @@ trimthenstep6: if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; + } else if (tcp_do_rfc3042) { + u_long oldcwnd = tp->snd_cwnd; + KASSERT(tp->t_dupacks == 1 || + tp->t_dupacks == 2, + ("dupacks not 1 or 2")); + tp->snd_cwnd += tp->t_dupacks * + tp->t_maxseg; + (void) tcp_output(tp); + tp->snd_cwnd = oldcwnd; + goto drop; } } else tp->t_dupacks = 0; |