diff options
author | Vijay Subramanian <subramanian.vijay@gmail.com> | 2011-12-20 13:23:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-21 01:03:23 -0500 |
commit | ab56222a32b9dbaae19c1d37f07b0ac4fc3c27ec (patch) | |
tree | ce5eff7879a1d80c419835171de13e52c24afdfb /net/ipv4/syncookies.c | |
parent | 08f4fc9da9a04d59f5c937e06e375158abb68206 (diff) |
tcp: Replace constants with #define macros
to record the state of SACK/FACK and DSACK for better readability and maintenance.
Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 90f6544c13e2..51fdbb490437 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c @@ -245,7 +245,7 @@ bool cookie_check_timestamp(struct tcp_options_received *tcp_opt, bool *ecn_ok) if (!sysctl_tcp_timestamps) return false; - tcp_opt->sack_ok = (options >> 4) & 0x1; + tcp_opt->sack_ok = (options & (1 << 4)) ? TCP_SACK_SEEN : 0; *ecn_ok = (options >> 5) & 1; if (*ecn_ok && !sysctl_tcp_ecn) return false; |