Page MenuHomeFreeBSD

kern: pull pru_sockaddr call out into sosockaddr()
ClosedPublic

Authored by kevans on Mar 9 2021, 1:11 PM.
Tags
None
Referenced Files
F157443364: D29146.id85388.diff
Thu, May 21, 1:12 PM
Unknown Object (File)
Wed, May 20, 10:06 AM
Unknown Object (File)
Tue, May 19, 8:45 PM
Unknown Object (File)
Sat, May 16, 5:57 PM
Unknown Object (File)
Wed, Apr 22, 4:07 PM
Unknown Object (File)
Apr 19 2026, 9:53 AM
Unknown Object (File)
Apr 16 2026, 1:46 AM
Unknown Object (File)
Apr 15 2026, 8:48 PM
Subscribers

Details

Summary

We will reuse this in Wireguard to grab the listening port that was
chosen if it was omitted, so we can use a consistent port for udp6 and
export the result to userland.

MFC after: 3 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsys/kern/uipc_socket.c:865SPELL1Possible Spelling Mistake
Warningsys/kern/uipc_socket.c:870SPELL1Possible Spelling Mistake
Warningsys/sys/socketvar.h:420SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 37693
Build 34582: arc lint + arc unit

Event Timeline

This method is used in a number of other places - was it your intention to convert them at some point?

This revision is now accepted and ready to land.Mar 9 2021, 2:59 PM

This method is used in a number of other places - was it your intention to convert them at some point?

Yup- I'll make a pass in the next couple of days, since I'm about out of immediate wireguard fun to be had.

melifaro added inline comments.
sys/kern/uipc_socket.c
865

Given other similar functions follow the pattern of so verb something, maybe it's worth naming this sogetsockaddr() or sofillsockaddr() for consistency?

sys/kern/uipc_socket.c
865

Oh, true, sorry; I'll rename it to sogetsockaddr for symmetry with, e.g., in_getsockaddr.

jhb added a subscriber: jhb.

This has been superseded by D30087.