Skip to content

Commit

Permalink
netfilter: nf_ct_tcp: wrong multiplication of TCPOLEN_TSTAMP_ALIGNED …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Jozsef Kadlecsik authored and Patrick McHardy committed Aug 30, 2011
1 parent 4a5cc84 commit bb9fc37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static void tcp_sack(const struct sk_buff *skb, unsigned int dataoff,
BUG_ON(ptr == NULL);

/* Fast path for timestamp-only option */
if (length == TCPOLEN_TSTAMP_ALIGNED*4
if (length == TCPOLEN_TSTAMP_ALIGNED
&& *(__be32 *)ptr == htonl((TCPOPT_NOP << 24)
| (TCPOPT_NOP << 16)
| (TCPOPT_TIMESTAMP << 8)
Expand Down

0 comments on commit bb9fc37

Please sign in to comment.