Florian Westphal 8c76368174 syncookies: check decoded options against sysctl settings
Discard the ACK if we find options that do not match current sysctl
settings.

Previously it was possible to create a connection with sack, wscale,
etc. enabled even if the feature was disabled via sysctl.

Also remove an unneeded call to tcp_sack_reset() in
cookie_check_timestamp: Both call sites (cookie_v4_check,
cookie_v6_check) zero "struct tcp_options_received", hand it to
tcp_parse_options() (which does not change tcp_opt->num_sacks/dsack)
and then call cookie_check_timestamp().

Even if num_sacks/dsacks were changed, the structure is allocated on
the stack and after cookie_check_timestamp returns only a few selected
members are copied to the inet_request_sock.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16 14:42:15 -07:00
..
2010-05-21 16:44:34 -05:00
2010-06-03 03:21:52 -07:00
2010-05-12 23:02:23 -07:00
2009-11-04 05:06:25 -08:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2009-11-04 05:06:25 -08:00
2010-06-02 05:16:23 -07:00
2010-04-13 01:41:33 -07:00
2010-06-03 03:21:52 -07:00
2010-06-10 22:47:08 -07:00
2010-06-10 23:31:35 -07:00
2010-06-03 03:21:52 -07:00
2009-12-26 20:46:28 -08:00
2010-06-08 09:31:21 -04:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-03-12 15:52:40 -08:00
2009-11-20 15:35:04 -08:00
2010-04-13 14:49:34 -07:00
2009-11-04 05:06:25 -08:00
2010-06-10 23:31:35 -07:00
2009-11-04 05:06:25 -08:00
2010-04-22 16:00:00 -07:00
2009-11-10 20:54:38 -08:00
2009-10-07 16:39:43 -04:00