Page MenuHomeFreeBSD

inpcb: use family specific sockaddr argument for bind functions
ClosedPublic

Authored by glebius on Feb 15 2023, 2:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 26, 11:31 AM
Unknown Object (File)
Mon, Jan 26, 4:47 AM
Unknown Object (File)
Sun, Jan 25, 12:41 PM
Unknown Object (File)
Sun, Jan 18, 4:06 PM
Unknown Object (File)
Sat, Jan 17, 3:26 PM
Unknown Object (File)
Sat, Jan 17, 1:41 PM
Unknown Object (File)
Dec 25 2025, 10:32 PM
Unknown Object (File)
Nov 23 2025, 7:56 AM

Details

Summary

Do the cast from sockaddr to either IPv4 or IPv6 sockaddr in the
protocol's pr_bind method and from there on go down the call
stack with family specific argument.

Diff Detail

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

Event Timeline

zlei added a subscriber: zlei.

Looks good to me.

Finally, we're getting rid of nam. Nice!

markj added inline comments.
sys/netinet/in_pcb.c
904

BTW, we are not consistent about using struct in_addr vs. struct in_addr * vs. in_addr_t in inpcb interfaces. It would be nice to simplify that too.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 15 2023, 6:31 PM
This revision was automatically updated to reflect the committed changes.