aboutsummaryrefslogtreecommitdiff
path: root/contrib/kyua/utils/sqlite
diff options
context:
space:
mode:
authorVincenzo Maffione <vmaffione@FreeBSD.org>2026-11-01 18:06:13 +0000
committerVincenzo Maffione <vmaffione@FreeBSD.org>2026-11-01 18:06:13 +0000
commit0a12444b2989c38a5d2e358e0f9ef01c665cc268 (patch)
treea30443120e06c5293138b4d7d711e2f649472582 /contrib/kyua/utils/sqlite
parentce1dc2df8019733f320b7338f8cf736faf0ffa5d (diff)
pkt-gen: fix UDP checksum when IPv6 address ranges are usedHEADmain
update_ip6() left the UDP checksum stale for most packets. Unlike update_ip(), it computed the incremental checksum delta only after the source-address wrap, so every earlier "break" (port increment, address increment, and both random paths) returned with udp_sum still 0 and no correction applied. The trailing delta block also re-read oaddr/naddr after they had been reassigned, so the source and destination deltas could not both be accounted for. Fold each delta in with new_udp_sum() before the corresponding break, mirroring the structure update_ip() already uses, and drop the stale trailing block. IPv4 was not affected. Verified by driving update_addresses() directly and recomputing every checksum from scratch over the real pseudo-header: 128 packets across six range configurations, 12 mismatches before, 0 after. IPv4 passes both before and after. Submitted by: Olivier Cochard-Labbé <olivier@cochard.me>
Diffstat (limited to 'contrib/kyua/utils/sqlite')
0 files changed, 0 insertions, 0 deletions