ar71xx: fix unaligned access hacks for tcp timestamps
[openwrt.git] / target / linux / ar71xx / patches-3.10 / 902-unaligned_access_hacks.patch
index a0b5824..20f5f1c 100644 (file)
 -              tp->rx_opt.rcv_tsval = ntohl(*ptr);
 +              tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
                ++ptr;
-               if (*ptr)
+-              if (*ptr)
 -                      tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
++              if (net_hdr_word(ptr))
 +                      tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
 +                                             tp->tsoffset;
                else