-
Notifications
You must be signed in to change notification settings - Fork 214
feat(quic): properly unpack both ipv4 and ipv6 addresses #1236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1216,7 +1216,12 @@ async def listen(self, maddr: Multiaddr, nursery: trio.Nursery) -> bool: | |
| self._nursery = active_nursery | ||
|
|
||
| # Get the actual bound address | ||
| bound_host, bound_port = self._socket.getsockname() | ||
| # Socket.getsockname() returns (host, port) for IPv4 or | ||
| # (host, port, flowinfo, scope_id) for IPv6 | ||
| address_result = self._socket.getsockname() | ||
| bound_host = address_result[0] | ||
| bound_port = address_result[1] | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hunk is currently redundant with |
||
| quic_version = multiaddr_to_quic_version(maddr) | ||
| bound_maddr = create_quic_multiaddr(bound_host, bound_port, quic_version) | ||
| self._bound_addresses = [bound_maddr] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These pre-commit hook rev bumps seem unrelated to issue
#1232and widen the scope of a stale bugfix branch. Please split them into a separate maintenance PR unless they are strictly required for the IPv6 listener fix.