Skip to content

gh-161100: Fix IPv6Interface.is_unspecified for IPv4-mapped addresses - #161101

Merged
gpshead merged 1 commit into
python:mainfrom
gpshead:ipaddress-mapped-is-unspecified
Nov 1, 2026
Merged

gpshead merged 1 commit into
python:mainfrom
gpshead:ipaddress-mapped-is-unspecified

Conversation

@gpshead

@gpshead gpshead commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Make IPv6Interface.is_unspecified defer to IPv6Address.is_unspecified, as the neighbouring is_loopback override already does, so IPv4-mapped ::ffff:0.0.0.0/128 interfaces are unspecified like the address itself. Results for unmapped addresses are unchanged. The tests also compare every is_* property of IPv4Interface with its IPv4-mapped IPv6Interface.

Fixes #161100

ANT-2026-DIFE27WF

…resses

Defer to IPv6Address.is_unspecified, as the is_loopback override does,
so ::ffff:0.0.0.0/128 interfaces are unspecified like the address.
@gpshead gpshead added the needs backport to 3.15 bugs and security fixes label Nov 1, 2026
@gpshead gpshead self-assigned this Nov 1, 2026
@gpshead
gpshead marked this pull request as ready for review November 1, 2026 18:05
@gpshead
gpshead enabled auto-merge (squash) November 1, 2026 18:06
@gpshead
gpshead merged commit 6e6e83e into python:main Nov 1, 2026
101 of 103 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 1, 2026

Copy link
Copy Markdown

GH-161136 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 1, 2026
gpshead added a commit that referenced this pull request Nov 1, 2026
…addresses (GH-161101) (#161136)

Defer to IPv6Address.is_unspecified, as the is_loopback override does,
so ::ffff:0.0.0.0/128 interfaces are unspecified like the address.

ANT-2026-DIFE27WF

(cherry picked from commit 6e6e83e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipaddress.IPv6Interface.is_unspecified is False for IPv4-mapped ::ffff:0.0.0.0

1 participant