diff options
-rw-r--r-- | net/core/filter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 93fbd01d2259..5b4486a60cf6 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
35 | #include <asm/system.h> | 35 | #include <asm/system.h> |
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <asm/unaligned.h> | ||
37 | #include <linux/filter.h> | 38 | #include <linux/filter.h> |
38 | 39 | ||
39 | /* No hurry in this branch */ | 40 | /* No hurry in this branch */ |
@@ -177,7 +178,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int | |||
177 | load_w: | 178 | load_w: |
178 | ptr = load_pointer(skb, k, 4, &tmp); | 179 | ptr = load_pointer(skb, k, 4, &tmp); |
179 | if (ptr != NULL) { | 180 | if (ptr != NULL) { |
180 | A = ntohl(*(u32 *)ptr); | 181 | A = ntohl(get_unaligned((u32 *)ptr)); |
181 | continue; | 182 | continue; |
182 | } | 183 | } |
183 | break; | 184 | break; |
@@ -186,7 +187,7 @@ load_w: | |||
186 | load_h: | 187 | load_h: |
187 | ptr = load_pointer(skb, k, 2, &tmp); | 188 | ptr = load_pointer(skb, k, 2, &tmp); |
188 | if (ptr != NULL) { | 189 | if (ptr != NULL) { |
189 | A = ntohs(*(u16 *)ptr); | 190 | A = ntohs(get_unaligned((u16 *)ptr)); |
190 | continue; | 191 | continue; |
191 | } | 192 | } |
192 | break; | 193 | break; |