1 --- a/arch/mips/include/asm/checksum.h
2 +++ b/arch/mips/include/asm/checksum.h
4 #define _ASM_CHECKSUM_H
7 +#include <linux/unaligned/packed_struct.h>
9 #include <asm/uaccess.h>
11 @@ -104,26 +105,30 @@ static inline __sum16 ip_fast_csum(const
12 const unsigned int *stop = word + ihl;
19 - carry = (csum < word[1]);
20 + csum = __get_unaligned_cpu32(word++);
22 + w = __get_unaligned_cpu32(word++);
28 - carry = (csum < word[2]);
29 + w = __get_unaligned_cpu32(word++);
35 - carry = (csum < word[3]);
36 + w = __get_unaligned_cpu32(word++);
44 - carry = (csum < *word);
45 + w = __get_unaligned_cpu32(word++);
50 } while (word != stop);
52 return csum_fold(csum);
53 --- a/include/linux/ip.h
54 +++ b/include/linux/ip.h
55 @@ -102,7 +102,7 @@ struct iphdr {
58 /*The options start here. */
63 #include <linux/skbuff.h>
64 --- a/include/linux/ipv6.h
65 +++ b/include/linux/ipv6.h
66 @@ -126,7 +126,7 @@ struct ipv6hdr {
68 struct in6_addr saddr;
69 struct in6_addr daddr;
75 --- a/include/linux/tcp.h
76 +++ b/include/linux/tcp.h
77 @@ -54,7 +54,7 @@ struct tcphdr {
85 * The union cast uses a gcc extension to avoid aliasing problems
86 --- a/include/linux/udp.h
87 +++ b/include/linux/udp.h
88 @@ -24,7 +24,7 @@ struct udphdr {
95 /* UDP socket options */
96 #define UDP_CORK 1 /* Never send partially complete segments */
97 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
98 +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
100 #include <linux/skbuff.h>
101 #include <linux/icmp.h>
102 #include <linux/sysctl.h>
103 +#include <linux/unaligned/packed_struct.h>
104 #include <net/route.h>
107 @@ -44,8 +45,8 @@ static bool ipv4_pkt_to_tuple(const stru
111 - tuple->src.u3.ip = ap[0];
112 - tuple->dst.u3.ip = ap[1];
113 + tuple->src.u3.ip = __get_unaligned_cpu32(ap++);
114 + tuple->dst.u3.ip = __get_unaligned_cpu32(ap);