aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2023-08-15 21:37:43 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2023-08-18 00:33:08 +0000
commit3bbf655b282690a70051f386c64aa95430b5fb64 (patch)
treeda7c0796a6d2a9a501fb2dd29450a5a1574fb07e
parent044dfb356bb6481af4de4ed0f7ef04c3b638bf71 (diff)
downloadsrc-3bbf655b282690a70051f386c64aa95430b5fb64.tar.gz
src-3bbf655b282690a70051f386c64aa95430b5fb64.zip
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)
-rw-r--r--sys/dev/e1000/em_txrx.c2
1 files changed, 1 insertions, 1 deletions
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);