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
Differential Revision: https://reviews.freebsd.org/D30042

(cherry picked from commit 1d712c05370dca8cbf81d1ecd9acd606fdcacaf4)

Details

Provenance
zleiAuthored on May 3 2021, 4:46 PM
markjCommitted on May 6 2021, 12:59 PM
Reviewer
ae
Differential Revision
D30042: traceroute6: Properly calculate UDP checksum
Parents
rG22efcea413cf: Introduce "soft" serseq variant.
Branches
Unknown
Tags
Unknown