HomeFreeBSD

traceroute6: Properly calculate UDP checksum

Description

traceroute6: Properly calculate UDP checksum

The revision D25604 capsicumize traceroute6. For UDP the send socket was
changed from SOCK_DGRAM to SOCK_RAW and thus the UDP checksum need be
calculated by application itself other than the kernel.

outpacket is filled with zeros by line 707, thus the first round the UDP
checksum is correct. But subsequent rounds outudp->uh_sum will be left
with garbage.

PR: 255507
Reviewed by: ae, markj, tuexen
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D30042

Details

Provenance
zleiAuthored on May 3 2021, 4:46 PM
markjCommitted on May 3 2021, 5:24 PM
Reviewer
ae
Differential Revision
D30042: traceroute6: Properly calculate UDP checksum
Parents
rG243b324f9668: devfs: Avoid comparison with an uninitialized var in devfs_fp_check()
Branches
Unknown
Tags
Unknown