]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: Use TCPOLEN_TSTAMP_ALIGNED macro instead of magic number.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Wed, 11 Oct 2006 02:40:50 +0000 (19:40 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 12 Oct 2006 06:59:54 +0000 (23:59 -0700)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c

index c83938b8fcb1201ddf403c6423cd83790397595b..f745095196f7bbd4fb10c7032fb669187e0f5574 100644 (file)
@@ -578,7 +578,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
        struct tcphdr *th = skb->h.th;
        struct {
                struct tcphdr th;
-               u32 tsopt[3];
+               u32 tsopt[TCPOLEN_TSTAMP_ALIGNED >> 2];
        } rep;
        struct ip_reply_arg arg;
 
index 3b6575478fcc381aae64ee2c0d7b2b791d5f1846..34e004bdeab0fa94dab33ffd1eada1a39ef00b92 100644 (file)
@@ -653,7 +653,7 @@ static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32
        int tot_len = sizeof(struct tcphdr);
 
        if (ts)
-               tot_len += 3*4;
+               tot_len += TCPOLEN_TSTAMP_ALIGNED;
 
        buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
                         GFP_ATOMIC);