ar71xx: fix a double dereference in the unaligned access patch
authorFelix Fietkau <nbd@openwrt.org>
Thu, 19 Mar 2015 11:58:30 +0000 (11:58 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 19 Mar 2015 11:58:30 +0000 (11:58 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 44885

target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch

index 5990f7073a12c65eab3b03df8d8ed92386896f53..9afac1be63e14a3b2756385a385d82034bcf3c9c 100644 (file)
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -833,10 +834,10 @@ static void tcp_v6_send_response(struct
+@@ -833,10 +834,10 @@ static void tcp_v6_send_response(struct 
        topt = (__be32 *)(t1 + 1);
  
        if (tsecr) {
  #include <linux/netdevice.h>
 --- a/include/net/inet_ecn.h
 +++ b/include/net/inet_ecn.h
-@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct
+@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct 
  {
        if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
                return 0;
                                       | TCPOLEN_TIMESTAMP))
 --- a/net/xfrm/xfrm_input.c
 +++ b/net/xfrm/xfrm_input.c
-@@ -152,8 +152,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
+@@ -152,8 +152,8 @@ int xfrm_parse_spi(struct sk_buff *skb, 
        if (!pskb_may_pull(skb, hlen))
                return -EINVAL;
  
  
 --- a/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 " */
        nf_log_buf_add(m, "LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
               ntohs(ih->payload_len) + sizeof(struct ipv6hdr),
+-             (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20,
 +             (ntohl(net_hdr_word(ih)) & 0x0ff00000) >> 20,
-              (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20,
               ih->hop_limit,
 -             (ntohl(*(__be32 *)ih) & 0x000fffff));
 +             (ntohl(net_hdr_word(ih)) & 0x000fffff));