diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-08-30 09:46:13 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-08-30 09:46:13 -0400 |
commit | bb9fc37358ffa9de1cc2b2b6f1a559b926ef50d9 (patch) | |
tree | 14a1f7bad41e2a6ad00673f20f268a84627254fc | |
parent | 4a5cc84ae7e19fb7a72a30332ba67af43e0ad1ad (diff) |
netfilter: nf_ct_tcp: wrong multiplication of TCPOLEN_TSTAMP_ALIGNED in tcp_sack skips fastpath
The wrong multiplication of TCPOLEN_TSTAMP_ALIGNED by 4 skips the fast path
for the timestamp-only option. Bug reported by Michael M. Builov (netfilter
bugzilla #738).
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index afc4ab7cfe01..8235b86b4e87 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -447,7 +447,7 @@ static void tcp_sack(const struct sk_buff *skb, unsigned int dataoff, | |||
447 | BUG_ON(ptr == NULL); | 447 | BUG_ON(ptr == NULL); |
448 | 448 | ||
449 | /* Fast path for timestamp-only option */ | 449 | /* Fast path for timestamp-only option */ |
450 | if (length == TCPOLEN_TSTAMP_ALIGNED*4 | 450 | if (length == TCPOLEN_TSTAMP_ALIGNED |
451 | && *(__be32 *)ptr == htonl((TCPOPT_NOP << 24) | 451 | && *(__be32 *)ptr == htonl((TCPOPT_NOP << 24) |
452 | | (TCPOPT_NOP << 16) | 452 | | (TCPOPT_NOP << 16) |
453 | | (TCPOPT_TIMESTAMP << 8) | 453 | | (TCPOPT_TIMESTAMP << 8) |