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
Unknown Object (File)
Tue, Mar 4, 6:16 PM
Unknown Object (File)
Sat, Mar 1, 1:42 PM
Unknown Object (File)
Thu, Feb 27, 5:00 PM
Unknown Object (File)
Feb 17 2025, 7:55 PM
Unknown Object (File)
Feb 10 2025, 4:22 PM
Unknown Object (File)
Feb 10 2025, 2:36 AM
Unknown Object (File)
Feb 9 2025, 5:16 AM
Unknown Object (File)
Feb 7 2025, 1:06 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.