zephyr/tests/net
Tomasz Bursztyka 0dd5113ca4 net/connection: Verify UDP and TCP checksum the easy way
No need to store/reset/recompute the chksums, only compute it again and
if it's not 0: drop the packet.

RFC 1071:

"To check a checksum, the 1's complement sum is computed over the
 same set of octets, including the checksum field.  If the result
 is all 1 bits (-0 in 1's complement arithmetic), the check succeeds."

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-12-05 11:43:54 +02:00
..
6lo tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
all tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
app tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
arp tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
buf samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
checksum_offload tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
context tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
dhcpv4 tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
ethernet_mgmt tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
icmpv6 samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
ieee802154 tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
iface tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
ip-addr tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
ipv6 tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
ipv6_fragment tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
lib tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
mgmt tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
mld net: Return fully calculated chksum 2018-12-05 11:43:54 +02:00
neighbor samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
net_pkt tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
promiscuous tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
ptp/clock tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
route tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
rpl tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
socket tests: socket: Bump number of available fd's 2018-11-04 22:04:11 +01:00
tcp net/connection: Verify UDP and TCP checksum the easy way 2018-12-05 11:43:54 +02:00
traffic_class tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
trickle samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
tx_timestamp tests/net: Apply L2 change everywhere where relevant 2018-11-30 11:12:13 -08:00
udp net/connection: Verify UDP and TCP checksum the easy way 2018-12-05 11:43:54 +02:00
utils net: Return fully calculated chksum 2018-12-05 11:43:54 +02:00
vlan tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
websocket samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00