netfilter: nf_ct_tcp: wrong multiplication of TCPOLEN_TSTAMP_ALIGNED in tcp_sack...
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 30 Aug 2011 13:46:13 +0000 (15:46 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 30 Aug 2011 13:46:13 +0000 (15:46 +0200)
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>
net/netfilter/nf_conntrack_proto_tcp.c

index afc4ab7cfe016b6a6774e2f69640f28108a0dbc3..8235b86b4e87efdccf73d0f552f0a1a01a9f3763 100644 (file)
@@ -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)