HomeFreeBSD

wg: Use ENETUNREACH when transmitting to a non-existent peer

Description

wg: Use ENETUNREACH when transmitting to a non-existent peer

The old errno value used is specifically for Capsicum and shouldn't be
co-opted in this way. It has special handling in the generic syscall
layer (see syscallret()). OpenBSD returns ENETUNREACH in this case;
let's do the same thing.

PR: 266712
Reviewed by: kevans, imp
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D44582

(cherry picked from commit 63613e3ba1e188e9fece43e1613bd697f04b345e)

Details

Provenance
markjAuthored on Apr 1 2024, 5:20 PM
Reviewer
kevans
Differential Revision
D44582: wg: Use ENETUNREACH when transmitting to a non-existent peer
Parents
rGd77e45e29f04: ng_socket: Treat EEXIST from kern_kldload() as success
Branches
Unknown
Tags
Unknown