kernel: bump 4.14 to 4.14.171
[openwrt/staging/rmilecki.git] / target / linux / ar71xx / patches-4.14 / 910-unaligned_access_hacks.patch
index 015c283e1db0db8be49422aa301af659682d1be2..6c216712b1edebc5bec7ee6e6caa5d8ec954f46e 100644 (file)
  struct ip_auth_hdr {
 --- a/include/uapi/linux/ipv6.h
 +++ b/include/uapi/linux/ipv6.h
+@@ -104,7 +104,7 @@ struct ipv6_destopt_hao {
+       __u8                    type;
+       __u8                    length;
+       struct in6_addr         addr;
+-} __attribute__((packed));
++} __attribute__((packed, aligned(2)));
+ /*
+  *    IPv6 fixed header
 @@ -131,7 +131,7 @@ struct ipv6hdr {
  
        struct  in6_addr        saddr;
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
+@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s
        topt = (__be32 *)(t1 + 1);
  
        if (tsecr) {
   */
 --- a/net/ipv6/datagram.c
 +++ b/net/ipv6/datagram.c
-@@ -485,7 +485,7 @@ int ipv6_recv_error(struct sock *sk, str
+@@ -486,7 +486,7 @@ int ipv6_recv_error(struct sock *sk, str
                                ipv6_iface_scope_id(&sin->sin6_addr,
                                                    IP6CB(skb)->iif);
                } else {
                                               &sin->sin6_addr);
                        sin->sin6_scope_id = 0;
                }
-@@ -836,12 +836,12 @@ int ip6_datagram_send_ctl(struct net *ne
+@@ -835,12 +835,12 @@ int ip6_datagram_send_ctl(struct net *ne
                        }
  
                        if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
  #endif /* _LINUX_TYPES_H */
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1351,8 +1351,8 @@ struct sk_buff **inet_gro_receive(struct
+@@ -1352,8 +1352,8 @@ struct sk_buff **inet_gro_receive(struct
        if (unlikely(ip_fast_csum((u8 *)iph, 5)))
                goto out_unlock;
  
        for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
        else if (skb)
                pkey = &ip_hdr(skb)->daddr;
  
                memcpy(p, foc->val, foc->len);
 --- a/net/ipv4/igmp.c
 +++ b/net/ipv4/igmp.c
-@@ -537,7 +537,7 @@ static struct sk_buff *add_grec(struct s
+@@ -548,7 +548,7 @@ static struct sk_buff *add_grec(struct s
                if (!skb)
                        return NULL;
                psrc = skb_put(skb, sizeof(__be32));
  #define IGMP_HOST_MEMBERSHIP_REPORT   0x12    /* Ditto */
 --- a/net/core/flow_dissector.c
 +++ b/net/core/flow_dissector.c
-@@ -108,7 +108,7 @@ __be32 __skb_flow_get_ports(const struct
+@@ -109,7 +109,7 @@ __be32 __skb_flow_get_ports(const struct
                ports = __skb_header_pointer(skb, thoff + poff,
                                             sizeof(_ports), data, hlen, &_ports);
                if (ports)
                        goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -220,7 +220,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
                        continue;
  
                iph2 = (struct ipv6hdr *)(p->data + off);
                return false;
  
        return true;
-@@ -634,13 +638,13 @@ static inline void ipv6_addr_set_v4mappe
+@@ -605,13 +609,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
                if (xb)
                        return i * 32 + 31 - __fls(ntohl(xb));
        }
-@@ -809,17 +813,18 @@ static inline int ip6_default_np_autolab
+@@ -780,17 +784,18 @@ static inline int ip6_default_np_autolab
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
                                __be32 flowlabel)
  {
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3858,14 +3858,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3878,14 +3878,16 @@ static bool tcp_parse_aligned_timestamp(
  {
        const __be32 *ptr = (const __be32 *)(th + 1);
  
   * No flags defined yet.
 --- a/net/core/utils.c
 +++ b/net/core/utils.c
-@@ -424,8 +424,14 @@ void inet_proto_csum_replace16(__sum16 *
+@@ -441,8 +441,14 @@ void inet_proto_csum_replace16(__sum16 *
                               bool pseudohdr)
  {
        __be32 diff[] = {
                *sum = csum_fold(csum_partial(diff, sizeof(diff),
 --- a/drivers/net/vxlan.c
 +++ b/drivers/net/vxlan.c
-@@ -1857,15 +1857,15 @@ static int vxlan_build_skb(struct sk_buf
+@@ -1868,15 +1868,15 @@ static int vxlan_build_skb(struct sk_buf
                return err;
  
        vxh = __skb_push(skb, sizeof(*vxh));