summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2020-02-28 11:38:56 +0000
committerjsg <jsg@openbsd.org>2020-02-28 11:38:56 +0000
commite53d33c0cbcb4f84fee1edaa6b51be01d0b1422b (patch)
tree097685c456f679169e67d62d5c3789681664f5f9 /sys
parentAllow devices with incomplete feature unit descriptor to attach. (diff)
downloadwireguard-openbsd-e53d33c0cbcb4f84fee1edaa6b51be01d0b1422b.tar.xz
wireguard-openbsd-e53d33c0cbcb4f84fee1edaa6b51be01d0b1422b.zip
correct data 16-bit aligned block of in4_cksum()
alex14fr at gmail reported qemu-system-arm -M virt with vio(4) failed rx checksums. The mi netinet/in4_cksum.c and the xscale path removed in in_cksum_arm.S 1.6 worked, for now just fix one line of assembly. ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/in_cksum_arm.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/in_cksum_arm.S b/sys/arch/arm/arm/in_cksum_arm.S
index 79ed5058e10..21fbf28e9e1 100644
--- a/sys/arch/arm/arm/in_cksum_arm.S
+++ b/sys/arch/arm/arm/in_cksum_arm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum_arm.S,v 1.7 2018/08/06 18:39:13 kettenis Exp $ */
+/* $OpenBSD: in_cksum_arm.S,v 1.8 2020/02/28 11:38:56 jsg Exp $ */
/* $NetBSD: in_cksum_arm.S,v 1.3 2003/11/26 10:31:53 rearnsha Exp $ */
/*
@@ -140,7 +140,7 @@ ENTRY(in4_cksum)
/* 0x02: Data 16-bit aligned */
ldr r4, [r6, #(IP_SRC - 2)] /* r4 = 10xx */
- ldr r7, [r6, #(IP_DST - 2)] /* r7 = xx76 */
+ ldrh r7, [r6, #(IP_DST + 2)] /* r7 = ..76 */
ldr r5, [r6, #(IP_SRC + 2)] /* r5 = 5432 */
mov r4, r4, lsr #16 /* r4 = ..10 */
orr r4, r4, r7, lsl #16 /* r4 = 7610 */