HomeFreeBSD

udp_input: remove a BSD stack relict

Description

udp_input: remove a BSD stack relict

I should had removed it 9 years ago in 8ad458a471ca. That commit
left save_ip as a write-only variable.

With save_ip removed we got one case when IP header can be modified:
the calculation of IP checksum with zeroed out header. This place
already has had a header saver char b[9]. However, the b[9] saver
didn't cover the ip_sum field, which we explicitly overwrite aliased
as (struct ipovly *)->ih_len. This was fine in cb34210012d4e, since
checksum doesn't need to be restored if packet is consumed. Now we
need to extend up to ip_sum field.

In collaboration with: ae
Differential revision: https://reviews.freebsd.org/D32719

Details

Provenance
glebiusAuthored on Oct 28 2021, 7:07 AM
Differential Revision
D32719: udp_input: remove a BSD stack relict
Parents
rGb788a226f6a2: Document net.inet.tcp.nolocaltimewait enabled.
Branches
Unknown
Tags
Unknown