kernel: update kernel 4.4 to version 4.4.50
[openwrt/openwrt.git] / target / linux / ar71xx / patches-4.4 / 910-unaligned_access_hacks.patch
index 235365dabae76be98e573de6befbd62d2a98b852..1e68cf72f56eabcba703b027675e53b9776c8d89 100644 (file)
                case IPV6_2292HOPOPTS:
 --- a/net/ipv6/ip6_gre.c
 +++ b/net/ipv6/ip6_gre.c
-@@ -394,7 +394,7 @@ static void ip6gre_err(struct sk_buff *s
+@@ -395,7 +395,7 @@ static void ip6gre_err(struct sk_buff *s
+               return;
+       ipv6h = (const struct ipv6hdr *)skb->data;
+       greh = (const struct gre_base_hdr *)(skb->data + offset);
+-      key = key_off ? *(__be32 *)(skb->data + key_off) : 0;
++      key = key_off ? net_hdr_word((__be32 *)(skb->data + key_off)) : 0;
  
        t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr,
-                               flags & GRE_KEY ?
--                              *(((__be32 *)p) + (grehlen / 4) - 1) : 0,
-+                              net_hdr_word(((__be32 *)p) + (grehlen / 4) - 1) : 0,
-                               p[1]);
-       if (!t)
-               return;
-@@ -476,11 +476,11 @@ static int ip6gre_rcv(struct sk_buff *sk
+                                key, greh->protocol);
+@@ -479,11 +479,11 @@ static int ip6gre_rcv(struct sk_buff *sk
                        offset += 4;
                }
                if (flags&GRE_KEY) {
                        offset += 4;
                }
        }
-@@ -742,7 +742,7 @@ static netdev_tx_t ip6gre_xmit2(struct s
+@@ -745,7 +745,7 @@ static netdev_tx_t ip6gre_xmit2(struct s
  
                if (tunnel->parms.o_flags&GRE_SEQ) {
                        ++tunnel->o_seqno;
                        ptr--;
                }
                if (tunnel->parms.o_flags&GRE_KEY) {
-@@ -838,7 +838,7 @@ static inline int ip6gre_xmit_ipv6(struc
+@@ -841,7 +841,7 @@ static inline int ip6gre_xmit_ipv6(struc
  
        dsfield = ipv6_get_dsfield(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
 --- a/net/ipv6/ip6_tunnel.c
 +++ b/net/ipv6/ip6_tunnel.c
-@@ -1386,7 +1386,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1407,7 +1407,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
  
        dsfield = ipv6_get_dsfield(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
                memcpy(p, foc->val, foc->len);
 --- a/net/ipv4/igmp.c
 +++ b/net/ipv4/igmp.c
-@@ -500,7 +500,7 @@ static struct sk_buff *add_grec(struct s
+@@ -505,7 +505,7 @@ static struct sk_buff *add_grec(struct s
                if (!skb)
                        return NULL;
                psrc = (__be32 *)skb_put(skb, sizeof(__be32));
                        goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -222,7 +222,7 @@ static struct sk_buff **ipv6_gro_receive
                        continue;
  
                iph2 = (struct ipv6hdr *)(p->data + off);
  
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3819,14 +3819,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3818,14 +3818,16 @@ static bool tcp_parse_aligned_timestamp(
  {
        const __be32 *ptr = (const __be32 *)(th + 1);