--- zzzz-none-000/linux-2.6.28.10/net/ipv4/tcp_ipv4.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/net/ipv4/tcp_ipv4.c 2012-02-14 14:37:49.000000000 +0000 @@ -1442,14 +1442,14 @@ const struct iphdr *iph = ip_hdr(skb); if (skb->ip_summed == CHECKSUM_COMPLETE) { - if (!tcp_v4_check(skb->len, iph->saddr, - iph->daddr, skb->csum)) { + if (!tcp_v4_check(skb->len, RD16(iph->saddr), + RD16(iph->daddr), skb->csum)) { skb->ip_summed = CHECKSUM_UNNECESSARY; return 0; } } - skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, + skb->csum = csum_tcpudp_nofold(RD16(iph->saddr), RD16(iph->daddr), skb->len, IPPROTO_TCP, 0); if (skb->len <= 76) { @@ -1555,9 +1555,9 @@ th = tcp_hdr(skb); - if (th->doff < sizeof(struct tcphdr) / 4) + if (TCP_DOFF(th) < sizeof(struct tcphdr) / 4) goto bad_packet; - if (!pskb_may_pull(skb, th->doff * 4)) + if (!pskb_may_pull(skb, TCP_DOFF(th) * 4)) goto discard_it; /* An explanation is required here, I think. @@ -1569,10 +1569,10 @@ th = tcp_hdr(skb); iph = ip_hdr(skb); - TCP_SKB_CB(skb)->seq = ntohl(th->seq); - TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + - skb->len - th->doff * 4); - TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); + TCP_SKB_CB(skb)->seq = ntohl(RD16(th->seq)); + TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + TCP_SYN(th) + TCP_FIN(th) + + skb->len - TCP_DOFF(th) * 4); + TCP_SKB_CB(skb)->ack_seq = ntohl(RD16(th->ack_seq)); TCP_SKB_CB(skb)->when = 0; TCP_SKB_CB(skb)->flags = iph->tos; TCP_SKB_CB(skb)->sacked = 0;