Page MenuHomeFreeBSD

socket: Add an option to retrieve a socket's FIB number
ClosedPublic

Authored by markj on Feb 4 2025, 5:11 PM.
Tags
None
Referenced Files
F115274862: D48834.diff
Tue, Apr 22, 3:18 AM
F115187911: D48834.id150635.diff
Mon, Apr 21, 6:40 AM
Unknown Object (File)
Sun, Apr 20, 11:27 PM
Unknown Object (File)
Thu, Mar 27, 3:36 AM
Unknown Object (File)
Mon, Mar 24, 2:19 PM
Unknown Object (File)
Mar 21 2025, 7:40 AM
Unknown Object (File)
Mar 4 2025, 6:16 PM
Unknown Object (File)
Mar 1 2025, 1:42 PM

Details

Summary

The SO_SETFIB option can be used to set a socket's FIB number, but there
is no way to retrieve it. Rename SO_SETFIB to SO_FIB and implement a
handler for it for getsockopt(2).

Sponsored by: Klara, Inc.
Sponsored by: Stormshield

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Feb 4 2025, 5:11 PM

If we move the fib to pcb would we be able to preserve this API? Of course it would start fail on sockets where FIB doesn't make any sense. But would we be able to preserve for meaningful sockets?

This revision is now accepted and ready to land.Feb 4 2025, 7:04 PM

If we move the fib to pcb would we be able to preserve this API? Of course it would start fail on sockets where FIB doesn't make any sense. But would we be able to preserve for meaningful sockets?

Yes, the handler could be moved to the protocol layer, like I did for setsockopt(SO_SETFIB) in D48666.