The net.inet.tcp.rack.rate_sample_method sysctl is copied into every
new RACK connection but accepts any integer, while the
TCP_BBR_RACK_RTT_USE socket option only accepts USE_RTT_HIGH (0),
USE_RTT_LOW (1) and USE_RTT_AVG (2). With any other value,
tcp_rack_xmit_timer_commit() panics an INVARIANTS kernel on the first
RTT sample of each new connection ("Unknown rtt variant"). Without
INVARIANTS it returns early on every sample, so the connection never
updates its SRTT, RTTVAR or RTO.
Validate the sysctl with a handler that accepts only the three values
that the socket option accepts, and document the third value in the
sysctl description and in tcp_rack(4).
Co-authored-by: Claude Opus 5.5
MFC after: 2 weeks