diff options
author | sbruno <sbruno@FreeBSD.org> | 2014-10-29 22:17:45 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2014-10-29 22:17:45 +0000 |
commit | 47c62aa0b0b32c345bff946b9d20c22176e209a6 (patch) | |
tree | 9dfed8b1a9ebe5ab0fd30460aa7b2f24a5340d19 /sys/netinet/tcp_var.h | |
parent | 97d69448b874f5c698f9ee0ceddc195e496c8838 (diff) | |
download | FreeBSD-src-47c62aa0b0b32c345bff946b9d20c22176e209a6.zip FreeBSD-src-47c62aa0b0b32c345bff946b9d20c22176e209a6.tar.gz |
MFC r272720, 273061, 273062, 273063, 273064
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources. If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us. Attempt to
downshift the mss once to a preconfigured value.
Note, this is turned off by default.
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 398df8b..10b1096 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -209,8 +209,10 @@ struct tcpcb { u_int t_keepcnt; /* number of keepalives before close */ u_int t_tsomax; /* tso burst length limit */ + u_int t_pmtud_saved_maxopd; /* pre-blackhole MSS */ + u_int t_flags2; /* More tcpcb flags storage */ - uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ + uint32_t t_ispare[6]; /* 5 UTO, 1 TBD */ void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ }; @@ -284,6 +286,13 @@ struct tcpcb { #endif /* TCP_SIGNATURE */ /* + * Flags for PLPMTU handling, t_flags2 + */ +#define TF2_PLPMTU_BLACKHOLE 0x00000001 /* Possible PLPMTUD Black Hole. */ +#define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ +#define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ + +/* * Structure to hold TCP options that are only used during segment * processing (in tcp_input), but not held in the tcpcb. * It's basically used to reduce the number of parameters |