ar71xx: fix a double dereference in the unaligned access patch

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44885
This commit is contained in:
Felix Fietkau 2015-03-19 11:58:30 +00:00
parent 2077b18e6b
commit 75e828c117

View file

@ -869,12 +869,12 @@
--- a/net/ipv6/netfilter/nf_log_ipv6.c --- a/net/ipv6/netfilter/nf_log_ipv6.c
+++ b/net/ipv6/netfilter/nf_log_ipv6.c +++ b/net/ipv6/netfilter/nf_log_ipv6.c
@@ -63,9 +63,10 @@ static void dump_ipv6_packet(struct nf_l @@ -63,9 +63,9 @@ static void dump_ipv6_packet(struct nf_l
/* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */
nf_log_buf_add(m, "LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ", nf_log_buf_add(m, "LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
ntohs(ih->payload_len) + sizeof(struct ipv6hdr), ntohs(ih->payload_len) + sizeof(struct ipv6hdr),
- (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20,
+ (ntohl(net_hdr_word(ih)) & 0x0ff00000) >> 20, + (ntohl(net_hdr_word(ih)) & 0x0ff00000) >> 20,
(ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20,
ih->hop_limit, ih->hop_limit,
- (ntohl(*(__be32 *)ih) & 0x000fffff)); - (ntohl(*(__be32 *)ih) & 0x000fffff));
+ (ntohl(net_hdr_word(ih)) & 0x000fffff)); + (ntohl(net_hdr_word(ih)) & 0x000fffff));