Page MenuHomeFreeBSD

ping: use CMSG_FIRSTHDR() for accessing ancillary data
ClosedPublic

Authored by sucanjan_gmail.com on Aug 24 2019, 4:31 PM.

Details

Summary

Use CMSG_FIRSTHDR() for accessing ancillary data

This should fix alignment error when built for sparc64 and powerpcspe.

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Well, it fixes the build. But now the program segfaults.

msg.msg_controllen must be initialized for CMSG_FIRSTHDR().

asomers accepted this revision.Aug 24 2019, 5:57 PM
This revision is now accepted and ready to land.Aug 24 2019, 5:57 PM
This revision was automatically updated to reflect the committed changes.