From: Dave Taht <[email protected]>
This missing bit of the hack saves hugely on instruction traps
on tcp connections to ar71xx based routers.
---
.../patches-3.10/902-unaligned_access_hacks.patch | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
index a0b5824..4144d45 100644
--- a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
@@ -884,9 +884,11 @@
options++;
} else
tpi->seq = 0;
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
+index e15d330..c6496eb 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
-@@ -3625,14 +3625,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3625,14 +3625,16 @@ static bool tcp_parse_aligned_timestamp(struct
tcp_sock *tp, const struct tcphdr
{
const __be32 *ptr = (const __be32 *)(th + 1);
@@ -900,8 +902,9 @@
- 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
--
1.7.9.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel