Page MenuHomeFreeBSD

tests: exercise unix `connectat(2)` with a socket peer descriptor
Needs ReviewPublic

Authored by inquire_JohnEricson.me on Wed, Jul 22, 9:37 PM.
Tags
None
Referenced Files
F164327896: D58406.diff
Thu, Jul 30, 8:29 PM
F164317778: D58406.id182484.diff
Thu, Jul 30, 5:49 PM
Unknown Object (File)
Wed, Jul 29, 3:03 PM
Unknown Object (File)
Wed, Jul 29, 9:30 AM
Unknown Object (File)
Mon, Jul 27, 2:07 PM
Unknown Object (File)
Mon, Jul 27, 6:02 AM
Unknown Object (File)
Sun, Jul 26, 5:28 PM
Unknown Object (File)
Sun, Jul 26, 3:39 PM
Subscribers

Details

Reviewers
markj
kib
Group Reviewers
capsicum
Summary

Cover the new fd-direct connect path: stream connect and data passing,
the peer address reported by getpeername(2), datagram to an unbound
peer, the EINVAL/ENOTSOCK/EPROTOTYPE/ECONNREFUSED error matrix,
and the Capsicum token semantics — a descriptor limited to
CAP_CONNECTAT can be connected to but not listened on, accepted from,
or read, and one lacking CAP_CONNECTAT cannot be a connect target.

Stream listeners are always bound: uipc_listen() refuses unbound
sockets with EDESTADDRREQ, so an unbound fd-direct listener is not
reachable even with this feature.

Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems>
Assisted-by: Claude Code (Claude Opus 4.8 and Fable 5)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75029
Build 71912: arc lint + arc unit