]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ICMP checksum test: Fix for big endian
authorCharlie Root <renato.riolino@eldorado.org.br>
Tue, 12 Jan 2021 01:56:12 +0000 (18:56 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Thu, 7 Oct 2021 17:38:50 +0000 (11:38 -0600)
commitd55574c91830d12b308664e4a165accffad22e06
tree085d261075112d8fd0cc346c0e573a58962d4dfa
parent1ee0746e1af042f5c02f4121652f4ea0ec3788d3
ICMP checksum test: Fix for big endian

The in_cksum tests originally tried to simulate a BE environment by
swapping the byte order of the input.  But that's overcomplicated, and
didn't actually work on real BE hardware.  The correct testing strategy
is just to test on the native endianness, and run the tests in both BE
and LE environments.

Submitted by: Renato Riolino <renato.riolino@eldorado.org.br>
Reviewed By: asomers
Differential Revision: https://reviews.freebsd.org/D23193

(cherry picked from commit 292808246db702b9194deb8938e40fd06914aea9)
sbin/ping/tests/in_cksum_test.c