aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-20 22:06:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-20 22:06:52 -0400
commit0eae88f31ca2b88911ce843452054139e028771f (patch)
tree90f50197d8e1e50e3621e9c525bd4ca2634fe368 /net/ipv4/tcp_output.c
parentcb903bf4ee2d6e53210e2174d363e10698112042 (diff)
net: Fix various endianness glitches
Sparse can help us find endianness bugs, but we need to make some cleanups to be able to more easily spot real bugs. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 2b7d71fb8439..429ad9286efc 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -861,7 +861,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
861 th->urg_ptr = htons(tp->snd_up - tcb->seq); 861 th->urg_ptr = htons(tp->snd_up - tcb->seq);
862 th->urg = 1; 862 th->urg = 1;
863 } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { 863 } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) {
864 th->urg_ptr = 0xFFFF; 864 th->urg_ptr = htons(0xFFFF);
865 th->urg = 1; 865 th->urg = 1;
866 } 866 }
867 } 867 }
@@ -2485,7 +2485,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
2485 *tail-- ^= TCP_SKB_CB(skb)->seq + 1; 2485 *tail-- ^= TCP_SKB_CB(skb)->seq + 1;
2486 2486
2487 /* recommended */ 2487 /* recommended */
2488 *tail-- ^= ((th->dest << 16) | th->source); 2488 *tail-- ^= (((__force u32)th->dest << 16) | (__force u32)th->source);
2489 *tail-- ^= (u32)(unsigned long)cvp; /* per sockopt */ 2489 *tail-- ^= (u32)(unsigned long)cvp; /* per sockopt */
2490 2490
2491 sha_transform((__u32 *)&xvp->cookie_bakery[0], 2491 sha_transform((__u32 *)&xvp->cookie_bakery[0],