summaryrefslogtreecommitdiffstats
path: root/net/ipv4/syncookies.c
diff options
context:
space:
mode:
authorVijay Subramanian2011-12-20 14:23:24 +0100
committerDavid S. Miller2011-12-21 07:03:23 +0100
commitab56222a32b9dbaae19c1d37f07b0ac4fc3c27ec (patch)
treece5eff7879a1d80c419835171de13e52c24afdfb /net/ipv4/syncookies.c
parentnet: doc: fix many typos in scaling.txt (diff)
downloadkernel-qcow2-linux-ab56222a32b9dbaae19c1d37f07b0ac4fc3c27ec.tar.gz
kernel-qcow2-linux-ab56222a32b9dbaae19c1d37f07b0ac4fc3c27ec.tar.xz
kernel-qcow2-linux-ab56222a32b9dbaae19c1d37f07b0ac4fc3c27ec.zip
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.c2
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;