CC: kernel: upgrade to 3.18.71
[15.05/openwrt.git] / target / linux / ar71xx / patches-3.18 / 902-unaligned_access_hacks.patch
index c77b845..8da26fd 100644 (file)
@@ -1,8 +1,6 @@
-Index: linux-3.18.7/arch/mips/include/asm/checksum.h
-===================================================================
---- linux-3.18.7.orig/arch/mips/include/asm/checksum.h 2015-02-11 08:01:12.000000000 +0100
-+++ linux-3.18.7/arch/mips/include/asm/checksum.h      2015-02-15 01:50:55.118444466 +0100
-@@ -134,26 +134,30 @@
+--- a/arch/mips/include/asm/checksum.h
++++ b/arch/mips/include/asm/checksum.h
+@@ -134,26 +134,30 @@ static inline __sum16 ip_fast_csum(const
        const unsigned int *stop = word + ihl;
        unsigned int csum;
        int carry;
@@ -44,7 +42,7 @@ Index: linux-3.18.7/arch/mips/include/asm/checksum.h
        } while (word != stop);
  
        return csum_fold(csum);
-@@ -222,69 +226,4 @@
+@@ -222,69 +226,4 @@ static inline __sum16 ip_compute_csum(co
        return csum_fold(csum_partial(buff, len, 0));
  }
  
@@ -114,11 +112,9 @@ Index: linux-3.18.7/arch/mips/include/asm/checksum.h
 -}
 -
  #endif /* _ASM_CHECKSUM_H */
-Index: linux-3.18.7/include/uapi/linux/ip.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/ip.h  2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/ip.h       2015-02-15 01:50:55.118444466 +0100
-@@ -102,7 +102,7 @@
+--- a/include/uapi/linux/ip.h
++++ b/include/uapi/linux/ip.h
+@@ -102,7 +102,7 @@ struct iphdr {
        __be32  saddr;
        __be32  daddr;
        /*The options start here. */
@@ -127,11 +123,9 @@ Index: linux-3.18.7/include/uapi/linux/ip.h
  
  
  struct ip_auth_hdr {
-Index: linux-3.18.7/include/uapi/linux/ipv6.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/ipv6.h        2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/ipv6.h     2015-02-15 01:50:55.118444466 +0100
-@@ -125,7 +125,7 @@
+--- a/include/uapi/linux/ipv6.h
++++ b/include/uapi/linux/ipv6.h
+@@ -125,7 +125,7 @@ struct ipv6hdr {
  
        struct  in6_addr        saddr;
        struct  in6_addr        daddr;
@@ -140,11 +134,9 @@ Index: linux-3.18.7/include/uapi/linux/ipv6.h
  
  
  /* index values for the variables in ipv6_devconf */
-Index: linux-3.18.7/include/uapi/linux/tcp.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/tcp.h 2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/tcp.h      2015-02-15 01:50:55.118444466 +0100
-@@ -54,7 +54,7 @@
+--- a/include/uapi/linux/tcp.h
++++ b/include/uapi/linux/tcp.h
+@@ -54,7 +54,7 @@ struct tcphdr {
        __be16  window;
        __sum16 check;
        __be16  urg_ptr;
@@ -153,7 +145,7 @@ Index: linux-3.18.7/include/uapi/linux/tcp.h
  
  /*
   *    The union cast uses a gcc extension to avoid aliasing problems
-@@ -64,7 +64,7 @@
+@@ -64,7 +64,7 @@ struct tcphdr {
  union tcp_word_hdr { 
        struct tcphdr hdr;
        __be32            words[5];
@@ -162,11 +154,9 @@ Index: linux-3.18.7/include/uapi/linux/tcp.h
  
  #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) 
  
-Index: linux-3.18.7/include/uapi/linux/udp.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/udp.h 2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/udp.h      2015-02-15 01:50:55.118444466 +0100
-@@ -24,7 +24,7 @@
+--- a/include/uapi/linux/udp.h
++++ b/include/uapi/linux/udp.h
+@@ -24,7 +24,7 @@ struct udphdr {
        __be16  dest;
        __be16  len;
        __sum16 check;
@@ -175,11 +165,9 @@ Index: linux-3.18.7/include/uapi/linux/udp.h
  
  /* UDP socket options */
  #define UDP_CORK      1       /* Never send partially complete segments */
-Index: linux-3.18.7/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c   2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c        2015-02-15 01:50:55.118444466 +0100
-@@ -41,8 +41,8 @@
+--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
++++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+@@ -41,8 +41,8 @@ static bool ipv4_pkt_to_tuple(const stru
        if (ap == NULL)
                return false;
  
@@ -190,11 +178,9 @@ Index: linux-3.18.7/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
  
        return true;
  }
-Index: linux-3.18.7/include/uapi/linux/icmp.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/icmp.h        2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/icmp.h     2015-02-15 01:50:55.118444466 +0100
-@@ -80,7 +80,7 @@
+--- a/include/uapi/linux/icmp.h
++++ b/include/uapi/linux/icmp.h
+@@ -80,7 +80,7 @@ struct icmphdr {
                __be16  mtu;
        } frag;
    } un;
@@ -203,11 +189,9 @@ Index: linux-3.18.7/include/uapi/linux/icmp.h
  
  
  /*
-Index: linux-3.18.7/include/uapi/linux/in6.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/in6.h 2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/in6.h      2015-02-15 01:50:55.118444466 +0100
-@@ -42,7 +42,7 @@
+--- a/include/uapi/linux/in6.h
++++ b/include/uapi/linux/in6.h
+@@ -42,7 +42,7 @@ struct in6_addr {
  #define s6_addr16             in6_u.u6_addr16
  #define s6_addr32             in6_u.u6_addr32
  #endif
@@ -216,10 +200,8 @@ Index: linux-3.18.7/include/uapi/linux/in6.h
  #endif /* __UAPI_DEF_IN6_ADDR */
  
  #if __UAPI_DEF_SOCKADDR_IN6
-Index: linux-3.18.7/net/ipv6/tcp_ipv6.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/tcp_ipv6.c      2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/tcp_ipv6.c   2015-02-15 02:12:55.605235801 +0100
+--- a/net/ipv6/tcp_ipv6.c
++++ b/net/ipv6/tcp_ipv6.c
 @@ -39,6 +39,7 @@
  #include <linux/ipsec.h>
  #include <linux/times.h>
@@ -228,7 +210,7 @@ Index: linux-3.18.7/net/ipv6/tcp_ipv6.c
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -833,10 +834,10 @@
+@@ -844,10 +845,10 @@ static void tcp_v6_send_response(struct
        topt = (__be32 *)(t1 + 1);
  
        if (tsecr) {
@@ -243,10 +225,8 @@ Index: linux-3.18.7/net/ipv6/tcp_ipv6.c
        }
  
  #ifdef CONFIG_TCP_MD5SIG
-Index: linux-3.18.7/include/linux/ipv6.h
-===================================================================
---- linux-3.18.7.orig/include/linux/ipv6.h     2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/linux/ipv6.h  2015-02-15 01:50:55.118444466 +0100
+--- a/include/linux/ipv6.h
++++ b/include/linux/ipv6.h
 @@ -5,6 +5,7 @@
  
  #define ipv6_optlen(p)  (((p)->hdrlen+1) << 3)
@@ -255,11 +235,9 @@ Index: linux-3.18.7/include/linux/ipv6.h
  /*
   * This structure contains configuration options per IPv6 link.
   */
-Index: linux-3.18.7/net/ipv6/datagram.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/datagram.c      2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/datagram.c   2015-02-15 01:50:55.118444466 +0100
-@@ -374,7 +374,7 @@
+--- a/net/ipv6/datagram.c
++++ b/net/ipv6/datagram.c
+@@ -390,7 +390,7 @@ int ipv6_recv_error(struct sock *sk, str
                                ipv6_iface_scope_id(&sin->sin6_addr,
                                                    IP6CB(skb)->iif);
                } else {
@@ -268,7 +246,7 @@ Index: linux-3.18.7/net/ipv6/datagram.c
                                               &sin->sin6_addr);
                        sin->sin6_scope_id = 0;
                }
-@@ -712,12 +712,12 @@
+@@ -724,12 +724,12 @@ int ip6_datagram_send_ctl(struct net *ne
                        }
  
                        if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
@@ -283,20 +261,9 @@ Index: linux-3.18.7/net/ipv6/datagram.c
                        break;
  
                case IPV6_2292HOPOPTS:
-Index: linux-3.18.7/net/ipv6/ip6_gre.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/ip6_gre.c       2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/ip6_gre.c    2015-02-15 01:50:55.118444466 +0100
-@@ -393,7 +393,7 @@
-       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 == NULL)
-               return;
-@@ -475,11 +475,11 @@
+--- a/net/ipv6/ip6_gre.c
++++ b/net/ipv6/ip6_gre.c
+@@ -479,11 +479,11 @@ static int ip6gre_rcv(struct sk_buff *sk
                        offset += 4;
                }
                if (flags&GRE_KEY) {
@@ -310,7 +277,7 @@ Index: linux-3.18.7/net/ipv6/ip6_gre.c
                        offset += 4;
                }
        }
-@@ -744,7 +744,7 @@
+@@ -748,7 +748,7 @@ static netdev_tx_t ip6gre_xmit2(struct s
  
                if (tunnel->parms.o_flags&GRE_SEQ) {
                        ++tunnel->o_seqno;
@@ -319,7 +286,7 @@ Index: linux-3.18.7/net/ipv6/ip6_gre.c
                        ptr--;
                }
                if (tunnel->parms.o_flags&GRE_KEY) {
-@@ -840,7 +840,7 @@
+@@ -844,7 +844,7 @@ static inline int ip6gre_xmit_ipv6(struc
  
        dsfield = ipv6_get_dsfield(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
@@ -328,11 +295,9 @@ Index: linux-3.18.7/net/ipv6/ip6_gre.c
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL)
                fl6.flowlabel |= ip6_flowlabel(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
-Index: linux-3.18.7/net/ipv6/ip6_tunnel.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/ip6_tunnel.c    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/ip6_tunnel.c 2015-02-15 01:50:55.118444466 +0100
-@@ -1291,7 +1291,7 @@
+--- a/net/ipv6/ip6_tunnel.c
++++ b/net/ipv6/ip6_tunnel.c
+@@ -1301,7 +1301,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
  
        dsfield = ipv6_get_dsfield(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
@@ -341,11 +306,9 @@ Index: linux-3.18.7/net/ipv6/ip6_tunnel.c
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL)
                fl6.flowlabel |= ip6_flowlabel(ipv6h);
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
-Index: linux-3.18.7/net/ipv6/exthdrs.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/exthdrs.c       2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/exthdrs.c    2015-02-15 01:50:55.118444466 +0100
-@@ -573,7 +573,7 @@
+--- a/net/ipv6/exthdrs.c
++++ b/net/ipv6/exthdrs.c
+@@ -573,7 +573,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
                goto drop;
        }
  
@@ -354,11 +317,9 @@ Index: linux-3.18.7/net/ipv6/exthdrs.c
        if (pkt_len <= IPV6_MAXPLEN) {
                IP6_INC_STATS_BH(net, ipv6_skb_idev(skb),
                                 IPSTATS_MIB_INHDRERRORS);
-Index: linux-3.18.7/include/linux/types.h
-===================================================================
---- linux-3.18.7.orig/include/linux/types.h    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/linux/types.h 2015-02-15 01:50:55.118444466 +0100
-@@ -213,5 +213,11 @@
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -213,5 +213,11 @@ struct callback_head {
  };
  #define rcu_head callback_head
  
@@ -370,11 +331,9 @@ Index: linux-3.18.7/include/linux/types.h
 +
  #endif /*  __ASSEMBLY__ */
  #endif /* _LINUX_TYPES_H */
-Index: linux-3.18.7/net/ipv4/af_inet.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/af_inet.c       2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/af_inet.c    2015-02-15 01:50:55.118444466 +0100
-@@ -1324,8 +1324,8 @@
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1329,8 +1329,8 @@ static struct sk_buff **inet_gro_receive
        if (unlikely(ip_fast_csum((u8 *)iph, 5)))
                goto out_unlock;
  
@@ -385,11 +344,9 @@ Index: linux-3.18.7/net/ipv4/af_inet.c
        id >>= 16;
  
        for (p = *head; p; p = p->next) {
-Index: linux-3.18.7/net/ipv4/route.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/route.c 2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/route.c      2015-02-15 01:50:55.118444466 +0100
-@@ -454,7 +454,7 @@
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -454,7 +454,7 @@ static struct neighbour *ipv4_neigh_look
        else if (skb)
                pkey = &ip_hdr(skb)->daddr;
  
@@ -398,11 +355,9 @@ Index: linux-3.18.7/net/ipv4/route.c
        if (n)
                return n;
        return neigh_create(&arp_tbl, pkey, dev);
-Index: linux-3.18.7/net/ipv4/tcp_output.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/tcp_output.c    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/tcp_output.c 2015-02-15 01:50:55.122444370 +0100
-@@ -446,48 +446,53 @@
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -446,48 +446,53 @@ static void tcp_options_write(__be32 *pt
        u16 options = opts->options;    /* mungable copy */
  
        if (unlikely(OPTION_MD5 & options)) {
@@ -479,7 +434,7 @@ Index: linux-3.18.7/net/ipv4/tcp_output.c
        }
  
        if (unlikely(opts->num_sack_blocks)) {
-@@ -495,16 +500,17 @@
+@@ -495,16 +500,17 @@ static void tcp_options_write(__be32 *pt
                        tp->duplicate_sack : tp->selective_acks;
                int this_sack;
  
@@ -503,7 +458,7 @@ Index: linux-3.18.7/net/ipv4/tcp_output.c
                }
  
                tp->rx_opt.dsack = 0;
-@@ -513,9 +519,10 @@
+@@ -513,9 +519,10 @@ static void tcp_options_write(__be32 *pt
        if (unlikely(OPTION_FAST_OPEN_COOKIE & options)) {
                struct tcp_fastopen_cookie *foc = opts->fastopen_cookie;
  
@@ -517,11 +472,9 @@ Index: linux-3.18.7/net/ipv4/tcp_output.c
  
                memcpy(ptr, foc->val, foc->len);
                if ((foc->len & 3) == 2) {
-Index: linux-3.18.7/net/ipv4/igmp.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/igmp.c  2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/igmp.c       2015-02-15 01:50:55.122444370 +0100
-@@ -495,7 +495,7 @@
+--- a/net/ipv4/igmp.c
++++ b/net/ipv4/igmp.c
+@@ -495,7 +495,7 @@ static struct sk_buff *add_grec(struct s
                if (!skb)
                        return NULL;
                psrc = (__be32 *)skb_put(skb, sizeof(__be32));
@@ -530,11 +483,9 @@ Index: linux-3.18.7/net/ipv4/igmp.c
                scount++; stotal++;
                if ((type == IGMPV3_ALLOW_NEW_SOURCES ||
                     type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount) {
-Index: linux-3.18.7/include/uapi/linux/igmp.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/igmp.h        2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/igmp.h     2015-02-15 01:50:55.122444370 +0100
-@@ -32,7 +32,7 @@
+--- a/include/uapi/linux/igmp.h
++++ b/include/uapi/linux/igmp.h
+@@ -32,7 +32,7 @@ struct igmphdr {
        __u8 code;              /* For newer IGMP */
        __sum16 csum;
        __be32 group;
@@ -543,7 +494,7 @@ Index: linux-3.18.7/include/uapi/linux/igmp.h
  
  /* V3 group record types [grec_type] */
  #define IGMPV3_MODE_IS_INCLUDE                1
-@@ -48,7 +48,7 @@
+@@ -48,7 +48,7 @@ struct igmpv3_grec {
        __be16  grec_nsrcs;
        __be32  grec_mca;
        __be32  grec_src[0];
@@ -552,7 +503,7 @@ Index: linux-3.18.7/include/uapi/linux/igmp.h
  
  struct igmpv3_report {
        __u8 type;
-@@ -57,7 +57,7 @@
+@@ -57,7 +57,7 @@ struct igmpv3_report {
        __be16 resv2;
        __be16 ngrec;
        struct igmpv3_grec grec[0];
@@ -561,7 +512,7 @@ Index: linux-3.18.7/include/uapi/linux/igmp.h
  
  struct igmpv3_query {
        __u8 type;
-@@ -78,7 +78,7 @@
+@@ -78,7 +78,7 @@ struct igmpv3_query {
        __u8 qqic;
        __be16 nsrcs;
        __be32 srcs[0];
@@ -570,11 +521,9 @@ Index: linux-3.18.7/include/uapi/linux/igmp.h
  
  #define IGMP_HOST_MEMBERSHIP_QUERY    0x11    /* From RFC1112 */
  #define IGMP_HOST_MEMBERSHIP_REPORT   0x12    /* Ditto */
-Index: linux-3.18.7/net/core/flow_dissector.c
-===================================================================
---- linux-3.18.7.orig/net/core/flow_dissector.c        2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/core/flow_dissector.c     2015-02-15 01:50:55.122444370 +0100
-@@ -53,7 +53,7 @@
+--- a/net/core/flow_dissector.c
++++ b/net/core/flow_dissector.c
+@@ -53,7 +53,7 @@ __be32 __skb_flow_get_ports(const struct
                ports = __skb_header_pointer(skb, thoff + poff,
                                             sizeof(_ports), data, hlen, &_ports);
                if (ports)
@@ -583,11 +532,9 @@ Index: linux-3.18.7/net/core/flow_dissector.c
        }
  
        return 0;
-Index: linux-3.18.7/include/uapi/linux/icmpv6.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/icmpv6.h      2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/icmpv6.h   2015-02-15 01:50:55.122444370 +0100
-@@ -76,7 +76,7 @@
+--- a/include/uapi/linux/icmpv6.h
++++ b/include/uapi/linux/icmpv6.h
+@@ -76,7 +76,7 @@ struct icmp6hdr {
  #define icmp6_addrconf_other  icmp6_dataun.u_nd_ra.other
  #define icmp6_rt_lifetime     icmp6_dataun.u_nd_ra.rt_lifetime
  #define icmp6_router_pref     icmp6_dataun.u_nd_ra.router_pref
@@ -596,11 +543,9 @@ Index: linux-3.18.7/include/uapi/linux/icmpv6.h
  
  
  #define ICMPV6_ROUTER_PREF_LOW                0x3
-Index: linux-3.18.7/include/net/ndisc.h
-===================================================================
---- linux-3.18.7.orig/include/net/ndisc.h      2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/net/ndisc.h   2015-02-15 01:50:55.122444370 +0100
-@@ -76,7 +76,7 @@
+--- a/include/net/ndisc.h
++++ b/include/net/ndisc.h
+@@ -76,7 +76,7 @@ struct ra_msg {
          struct icmp6hdr               icmph;
        __be32                  reachable_time;
        __be32                  retrans_timer;
@@ -609,7 +554,7 @@ Index: linux-3.18.7/include/net/ndisc.h
  
  struct rd_msg {
        struct icmp6hdr icmph;
-@@ -148,10 +148,10 @@
+@@ -148,10 +148,10 @@ static inline u32 ndisc_hashfn(const voi
  {
        const u32 *p32 = pkey;
  
@@ -624,7 +569,7 @@ Index: linux-3.18.7/include/net/ndisc.h
  }
  
  static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey)
-@@ -168,8 +168,10 @@
+@@ -168,8 +168,10 @@ static inline struct neighbour *__ipv6_n
             n = rcu_dereference_bh(n->next)) {
                u32 *n32 = (u32 *) n->primary_key;
                if (n->dev == dev &&
@@ -637,19 +582,18 @@ Index: linux-3.18.7/include/net/ndisc.h
                        return n;
        }
  
-Index: linux-3.18.7/net/sched/cls_u32.c
-===================================================================
---- linux-3.18.7.orig/net/sched/cls_u32.c      2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/sched/cls_u32.c   2015-02-15 02:14:43.685467248 +0100
-@@ -148,6 +148,7 @@
+--- a/net/sched/cls_u32.c
++++ b/net/sched/cls_u32.c
+@@ -151,7 +151,7 @@ next_knode:
                        data = skb_header_pointer(skb, toff, 4, &hdata);
                        if (!data)
                                goto out;
+-                      if ((*data ^ key->val) & key->mask) {
 +                      if ((net_hdr_word(data) ^ key->val) & key->mask) {
-                       if ((*data ^ key->val) & key->mask) {
                                n = rcu_dereference_bh(n->next);
                                goto next_knode;
-@@ -201,8 +202,8 @@
+                       }
+@@ -204,8 +204,8 @@ check_terminal:
                                                  &hdata);
                        if (!data)
                                goto out;
@@ -660,11 +604,9 @@ Index: linux-3.18.7/net/sched/cls_u32.c
                }
                if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT)))
                        goto next_ht;
-Index: linux-3.18.7/net/ipv6/ip6_offload.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/ip6_offload.c   2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/ip6_offload.c        2015-02-15 02:14:06.541386363 +0100
-@@ -221,7 +221,7 @@
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -224,7 +224,7 @@ static struct sk_buff **ipv6_gro_receive
                        continue;
  
                iph2 = (struct ipv6hdr *)(p->data + off);
@@ -673,11 +615,9 @@ Index: linux-3.18.7/net/ipv6/ip6_offload.c
  
                /* All fields must match except length and Traffic Class.
                 * XXX skbs on the gro_list have all been parsed and pulled
-Index: linux-3.18.7/include/net/addrconf.h
-===================================================================
---- linux-3.18.7.orig/include/net/addrconf.h   2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/net/addrconf.h        2015-02-15 01:50:55.122444370 +0100
-@@ -43,7 +43,7 @@
+--- a/include/net/addrconf.h
++++ b/include/net/addrconf.h
+@@ -45,7 +45,7 @@ struct prefix_info {
        __be32                  reserved2;
  
        struct in6_addr         prefix;
@@ -686,18 +626,21 @@ Index: linux-3.18.7/include/net/addrconf.h
  
  
  #include <linux/netdevice.h>
-Index: linux-3.18.7/include/net/inet_ecn.h
-===================================================================
---- linux-3.18.7.orig/include/net/inet_ecn.h   2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/net/inet_ecn.h        2015-02-15 01:50:55.126444189 +0100
-@@ -115,13 +115,13 @@
- {
+--- a/include/net/inet_ecn.h
++++ b/include/net/inet_ecn.h
+@@ -124,9 +124,9 @@ static inline int IP6_ECN_set_ce(struct
        if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
                return 0;
--      *(__be32*)iph |= htonl(INET_ECN_CE << 20);
-+      net_hdr_word(iph) |= htonl(INET_ECN_CE << 20);
+-      from = *(__be32 *)iph;
++      from = net_hdr_word(iph);
+       to = from | htonl(INET_ECN_CE << 20);
+-      *(__be32 *)iph = to;
++      net_hdr_word(iph) = to;
+       if (skb->ip_summed == CHECKSUM_COMPLETE)
+               skb->csum = csum_add(csum_sub(skb->csum, from), to);
        return 1;
- }
+@@ -134,7 +134,7 @@ static inline int IP6_ECN_set_ce(struct
  
  static inline void IP6_ECN_clear(struct ipv6hdr *iph)
  {
@@ -706,11 +649,9 @@ Index: linux-3.18.7/include/net/inet_ecn.h
  }
  
  static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner)
-Index: linux-3.18.7/include/net/ipv6.h
-===================================================================
---- linux-3.18.7.orig/include/net/ipv6.h       2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/net/ipv6.h    2015-02-15 01:50:55.126444189 +0100
-@@ -109,7 +109,7 @@
+--- a/include/net/ipv6.h
++++ b/include/net/ipv6.h
+@@ -109,7 +109,7 @@ struct frag_hdr {
        __u8    reserved;
        __be16  frag_off;
        __be32  identification;
@@ -719,7 +660,7 @@ Index: linux-3.18.7/include/net/ipv6.h
  
  #define       IP6_MF          0x0001
  #define       IP6_OFFSET      0xFFF8
-@@ -398,8 +398,8 @@
+@@ -417,8 +417,8 @@ static inline void __ipv6_addr_set_half(
        }
  #endif
  #endif
@@ -730,7 +671,7 @@ Index: linux-3.18.7/include/net/ipv6.h
  }
  
  static inline void ipv6_addr_set(struct in6_addr *addr, 
-@@ -458,6 +458,8 @@
+@@ -477,6 +477,8 @@ static inline bool ipv6_prefix_equal(con
        const __be32 *a1 = addr1->s6_addr32;
        const __be32 *a2 = addr2->s6_addr32;
        unsigned int pdw, pbi;
@@ -739,7 +680,7 @@ Index: linux-3.18.7/include/net/ipv6.h
  
        /* check complete u32 in prefix */
        pdw = prefixlen >> 5;
-@@ -466,7 +468,9 @@
+@@ -485,7 +487,9 @@ static inline bool ipv6_prefix_equal(con
  
        /* check incomplete u32 in prefix */
        pbi = prefixlen & 0x1f;
@@ -750,7 +691,7 @@ Index: linux-3.18.7/include/net/ipv6.h
                return false;
  
        return true;
-@@ -609,13 +613,13 @@
+@@ -629,13 +633,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
@@ -766,7 +707,7 @@ Index: linux-3.18.7/include/net/ipv6.h
                if (xb)
                        return i * 32 + 31 - __fls(ntohl(xb));
        }
-@@ -739,17 +743,18 @@
+@@ -759,17 +763,18 @@ static inline __be32 ip6_make_flowlabel(
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
                                __be32 flowlabel)
  {
@@ -788,10 +729,8 @@ Index: linux-3.18.7/include/net/ipv6.h
  }
  
  static inline u8 ip6_tclass(__be32 flowinfo)
-Index: linux-3.18.7/include/net/secure_seq.h
-===================================================================
---- linux-3.18.7.orig/include/net/secure_seq.h 2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/net/secure_seq.h      2015-02-15 01:50:55.126444189 +0100
+--- a/include/net/secure_seq.h
++++ b/include/net/secure_seq.h
 @@ -2,6 +2,7 @@
  #define _NET_SECURE_SEQ
  
@@ -800,11 +739,9 @@ Index: linux-3.18.7/include/net/secure_seq.h
  
  u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
  u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
-Index: linux-3.18.7/include/uapi/linux/in.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/in.h  2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/in.h       2015-02-15 01:50:55.126444189 +0100
-@@ -78,7 +78,7 @@
+--- a/include/uapi/linux/in.h
++++ b/include/uapi/linux/in.h
+@@ -78,7 +78,7 @@ enum {
  /* Internet address. */
  struct in_addr {
        __be32  s_addr;
@@ -813,11 +750,9 @@ Index: linux-3.18.7/include/uapi/linux/in.h
  
  #define IP_TOS                1
  #define IP_TTL                2
-Index: linux-3.18.7/net/core/secure_seq.c
-===================================================================
---- linux-3.18.7.orig/net/core/secure_seq.c    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/core/secure_seq.c 2015-02-15 01:50:55.126444189 +0100
-@@ -46,11 +46,12 @@
+--- a/net/core/secure_seq.c
++++ b/net/core/secure_seq.c
+@@ -46,11 +46,12 @@ __u32 secure_tcpv6_sequence_number(const
        u32 secret[MD5_MESSAGE_BYTES / 4];
        u32 hash[MD5_DIGEST_WORDS];
        u32 i;
@@ -831,7 +766,7 @@ Index: linux-3.18.7/net/core/secure_seq.c
        secret[4] = net_secret[4] +
                (((__force u16)sport << 16) + (__force u16)dport);
        for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
-@@ -68,11 +69,12 @@
+@@ -68,11 +69,12 @@ u32 secure_ipv6_port_ephemeral(const __b
        u32 secret[MD5_MESSAGE_BYTES / 4];
        u32 hash[MD5_DIGEST_WORDS];
        u32 i;
@@ -845,7 +780,7 @@ Index: linux-3.18.7/net/core/secure_seq.c
        secret[4] = net_secret[4] + (__force u32)dport;
        for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
                secret[i] = net_secret[i];
-@@ -150,11 +152,12 @@
+@@ -150,11 +152,12 @@ u64 secure_dccpv6_sequence_number(__be32
        u32 hash[MD5_DIGEST_WORDS];
        u64 seq;
        u32 i;
@@ -859,11 +794,9 @@ Index: linux-3.18.7/net/core/secure_seq.c
        secret[4] = net_secret[4] +
                (((__force u16)sport << 16) + (__force u16)dport);
        for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
-Index: linux-3.18.7/net/ipv6/ip6_fib.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/ip6_fib.c       2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv6/ip6_fib.c    2015-02-15 01:50:55.126444189 +0100
-@@ -137,7 +137,7 @@
+--- a/net/ipv6/ip6_fib.c
++++ b/net/ipv6/ip6_fib.c
+@@ -137,7 +137,7 @@ static __be32 addr_bit_set(const void *t
         * See include/asm-generic/bitops/le.h.
         */
        return (__force __be32)(1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) &
@@ -872,11 +805,9 @@ Index: linux-3.18.7/net/ipv6/ip6_fib.c
  }
  
  static struct fib6_node *node_alloc(void)
-Index: linux-3.18.7/net/netfilter/nf_conntrack_proto_tcp.c
-===================================================================
---- linux-3.18.7.orig/net/netfilter/nf_conntrack_proto_tcp.c   2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/netfilter/nf_conntrack_proto_tcp.c        2015-02-15 01:50:55.126444189 +0100
-@@ -456,7 +456,7 @@
+--- a/net/netfilter/nf_conntrack_proto_tcp.c
++++ b/net/netfilter/nf_conntrack_proto_tcp.c
+@@ -456,7 +456,7 @@ static void tcp_sack(const struct sk_buf
  
        /* Fast path for timestamp-only option */
        if (length == TCPOLEN_TSTAMP_ALIGNED
@@ -885,11 +816,9 @@ Index: linux-3.18.7/net/netfilter/nf_conntrack_proto_tcp.c
                                       | (TCPOPT_NOP << 16)
                                       | (TCPOPT_TIMESTAMP << 8)
                                       | TCPOLEN_TIMESTAMP))
-Index: linux-3.18.7/net/xfrm/xfrm_input.c
-===================================================================
---- linux-3.18.7.orig/net/xfrm/xfrm_input.c    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/xfrm/xfrm_input.c 2015-02-15 01:50:55.126444189 +0100
-@@ -152,8 +152,8 @@
+--- a/net/xfrm/xfrm_input.c
++++ b/net/xfrm/xfrm_input.c
+@@ -154,8 +154,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
        if (!pskb_may_pull(skb, hlen))
                return -EINVAL;
  
@@ -900,11 +829,9 @@ Index: linux-3.18.7/net/xfrm/xfrm_input.c
        return 0;
  }
  
-Index: linux-3.18.7/net/ipv4/tcp_input.c
-===================================================================
---- linux-3.18.7.orig/net/ipv4/tcp_input.c     2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/net/ipv4/tcp_input.c  2015-02-15 01:50:55.126444189 +0100
-@@ -3677,14 +3677,16 @@
+--- a/net/ipv4/tcp_input.c
++++ b/net/ipv4/tcp_input.c
+@@ -3682,14 +3682,16 @@ static bool tcp_parse_aligned_timestamp(
  {
        const __be32 *ptr = (const __be32 *)(th + 1);
  
@@ -926,11 +853,9 @@ Index: linux-3.18.7/net/ipv4/tcp_input.c
                else
                        tp->rx_opt.rcv_tsecr = 0;
                return true;
-Index: linux-3.18.7/include/uapi/linux/if_pppox.h
-===================================================================
---- linux-3.18.7.orig/include/uapi/linux/if_pppox.h    2015-02-15 01:50:18.000000000 +0100
-+++ linux-3.18.7/include/uapi/linux/if_pppox.h 2015-02-15 01:50:55.126444189 +0100
-@@ -47,6 +47,7 @@
+--- a/include/uapi/linux/if_pppox.h
++++ b/include/uapi/linux/if_pppox.h
+@@ -47,6 +47,7 @@ struct pppoe_addr {
   */
  struct pptp_addr {
        __u16           call_id;
@@ -938,16 +863,14 @@ Index: linux-3.18.7/include/uapi/linux/if_pppox.h
        struct in_addr  sin_addr;
  };
  
-Index: linux-3.18.7/net/ipv6/netfilter/nf_log_ipv6.c
-===================================================================
---- linux-3.18.7.orig/net/ipv6/netfilter/nf_log_ipv6.c 2015-02-11 08:01:12.000000000 +0100
-+++ linux-3.18.7/net/ipv6/netfilter/nf_log_ipv6.c      2015-02-15 02:17:44.193854463 +0100
-@@ -63,9 +63,10 @@
+--- a/net/ipv6/netfilter/nf_log_ipv6.c
++++ b/net/ipv6/netfilter/nf_log_ipv6.c
+@@ -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));