IPv4: IP_HDRINCL may need a checksum.

IP_HDRINCL isn't POSIX. The FreeBSD manual page for it doesn't specify,
but the Linux manual page indicates it will compute the checksum.
traceroute seems to depend on it doing so.

Significantly improves the situation in #3210.
This commit is contained in:
Augustin Cavalier
2025-06-26 11:46:43 -04:00
parent 334de37d58
commit eb8651d492
@@ -1546,8 +1546,9 @@ ipv4_send_routed_data(net_protocol* _protocol, struct net_route* route,
header->source = source.sin_addr.s_addr;
header->checksum = 0;
header.Sync();
} else
} else if (header->checksum != 0) {
checksumNeeded = false;
}
TRACE(" Header was already supplied:");
TRACE_ONLY(dump_ipv4_header(*header));