]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
fix endianness bug in inet_lro
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 14 Oct 2007 18:41:09 +0000 (19:41 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 14 Oct 2007 19:41:52 +0000 (12:41 -0700)
all uses of and almost all assignments to lro_desc->tcp_ack assume that it's
net-endian; one converts net-endian to host-endian and sticks it in
lro_desc->tcp_ack.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/inet_lro.h
net/ipv4/inet_lro.c

index bb1c8773a1a17e7d21fbbac8c90b3baac241d12c..1246d46abbc089c6a87322b46fe6b03bde1f0189 100644 (file)
@@ -54,7 +54,7 @@ struct net_lro_desc {
        __wsum  data_csum;
        __be32 tcp_rcv_tsecr;
        __be32 tcp_rcv_tsval;
-       u32 tcp_ack;
+       __be32 tcp_ack;
        u32 tcp_next_seq;
        u32 skb_tot_frags_len;
        u16 ip_tot_len;
index 7f22474b52c4b8ef7caf5c6eb73ea19f35a6f18e..ac3b1d3dba2e0e81d2d032076aa429d14e6cf27f 100644 (file)
@@ -159,7 +159,7 @@ static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb,
        lro_desc->iph = iph;
        lro_desc->tcph = tcph;
        lro_desc->tcp_next_seq = ntohl(tcph->seq) + tcp_data_len;
-       lro_desc->tcp_ack = ntohl(tcph->ack_seq);
+       lro_desc->tcp_ack = tcph->ack_seq;
        lro_desc->tcp_window = tcph->window;
 
        lro_desc->pkt_aggr_cnt = 1;