Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
exclude: '.project-template|docs/conf.py|.*pb2\..*'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.20.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.10
rev: v0.15.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
rev: 1.0.0
hooks:
Copy link
Copy Markdown
Contributor

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 #1232 and 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.

- id: mdformat
additional_dependencies:
Expand Down
7 changes: 6 additions & 1 deletion libp2p/transport/quic/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hunk is currently redundant with main: origin/main already handles IPv4/IPv6 here via self._socket.getsockname()[:2], so this branch now conflicts without adding net behavior. I would rebase and drop this code change, then keep only regression coverage if issue #1232 still needs a PR.

quic_version = multiaddr_to_quic_version(maddr)
bound_maddr = create_quic_multiaddr(bound_host, bound_port, quic_version)
self._bound_addresses = [bound_maddr]
Expand Down
Loading