HomeFreeBSD

ping6: treat setsockopt failures as fatal

Description

ping6: treat setsockopt failures as fatal

ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process
incoming replies. When these options fail, replies are silently
dropped and ping6 appears to hang. Use err(3) instead of warn(3)
so the user gets a clear error and immediate exit.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by: pouria, jlduran, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56237

Details

Provenance
chris.longros_gmail.comAuthored on Apr 17 2026, 6:19 PM
jlduranCommitted on Apr 17 2026, 6:19 PM
Reviewer
pouria
Differential Revision
D56237: ping6: treat setsockopt failures as fatal
Parents
rG3fade68cfdf9: iflib: accurately count bytes/segments for TSO
Branches
Unknown
Tags
Unknown