mirror of https://github.com/hak5/openwrt.git
ar71xx: fix unaligned access hacks for tcp timestamps
This missing bit of the hack saves hugely on instruction traps on tcp connections to ar71xx based routers. Patch-by: Dave Taht <dave.taht@bufferbloat.net> Patchwork: http://patchwork.openwrt.org/patch/4905/ [juhosg: adjust subject, refresh kernel patch] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 39626lede-17.01
parent
d6cb5215a9
commit
6b8eb55ddb
|
@ -900,8 +900,9 @@
|
||||||
- tp->rx_opt.rcv_tsval = ntohl(*ptr);
|
- tp->rx_opt.rcv_tsval = ntohl(*ptr);
|
||||||
+ tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
|
+ tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
|
||||||
++ptr;
|
++ptr;
|
||||||
if (*ptr)
|
- if (*ptr)
|
||||||
- tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
|
- tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
|
||||||
|
+ if (net_hdr_word(ptr))
|
||||||
+ tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
|
+ tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
|
||||||
+ tp->tsoffset;
|
+ tp->tsoffset;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue