git: 3bbf655b2826 - stable/13 - e1000: Fix off by one ipcse
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Aug 2023 00:33:18 UTC
The branch stable/13 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=3bbf655b282690a70051f386c64aa95430b5fb64
commit 3bbf655b282690a70051f386c64aa95430b5fb64
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-08-15 21:37:43 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-08-18 00:33:08 +0000
e1000: Fix off by one ipcse
This has been off by one in the FreeBSD drivers as far back as I've
looked. Emperically HW and SW emulations I have available don't seem to
mind. Noticed while debugging other issues.
(cherry picked from commit eac761e967b34066aa7183474249df87d79a2f32)
---
sys/dev/e1000/em_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
index b90ab21cd825..765458d621f9 100644
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
@@ -290,7 +290,7 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi,
offsetof(struct ip, ip_sum);
if (csum_flags & CSUM_IP) {
*txd_upper |= E1000_TXD_POPTS_IXSM << 8;
- TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len);
+ TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len - 1);
cmd |= E1000_TXD_CMD_IP;
} else if (csum_flags & (CSUM_IP6_TCP | CSUM_IP6_UDP))
TXD->lower_setup.ip_fields.ipcse = htole16(0);