diff options
| author | Jeffrey Hsu <hsu@FreeBSD.org> | 2003-03-12 20:27:28 +0000 |
|---|---|---|
| committer | Jeffrey Hsu <hsu@FreeBSD.org> | 2003-03-12 20:27:28 +0000 |
| commit | 582a954b004963a562668386a33f960a9c763d37 (patch) | |
| tree | 956077f4fc837b16d5a347f5bb4ae1cc28d09b21 /sys/netinet | |
| parent | de9840c6e59becf83be0dcdbe964b5e61fdf115c (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/tcp_input.c | 14 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7717e06f5121..91c90d8df4a2 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; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 7717e06f5121..91c90d8df4a2 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.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; |
