Page MenuHomeFreeBSD

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

Authored by markj on Tue, Feb 4, 5:11 PM.

Details

Reviewers
glebius
Group Reviewers
network
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 62243
Build 59127: arc lint + arc unit

Event Timeline

markj requested review of this revision.Tue, Feb 4, 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.Tue, Feb 4, 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.