1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| 1160 static inline bool tcp_paws_reject(const struct tcp_options_received *rx_opt, 1161 int rst) 1162 { 1163 if (tcp_paws_check(rx_opt, 0)) 1164 return false; 1165 1166 /* RST segments are not recommended to carry timestamp, 1167 and, if they do, it is recommended to ignore PAWS because 1168 "their cleanup function should take precedence over timestamps." 1169 Certainly, it is mistake. It is necessary to understand the reasons 1170 of this constraint to relax it: if peer reboots, clock may go 1171 out-of-sync and half-open connections will not be reset. 1172 Actually, the problem would be not existing if all 1173 the implementations followed draft about maintaining clock 1174 via reboots. Linux-2.2 DOES NOT! 1175 1176 However, we can relax time bounds for RST segments to MSL. 1177 */ 1178 if (rst && get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_MSL) 1179 return false; 1180 return true; 1181 }
|