Skip to content

gh-91601: Use host addresses for IP interface reverse DNS names - #162183

Open
JunaidAhamed-7777 wants to merge 1 commit into
python:mainfrom
JunaidAhamed-7777:fix-interface-reverse-pointer
Open

JunaidAhamed-7777 wants to merge 1 commit into
python:mainfrom
JunaidAhamed-7777:fix-interface-reverse-pointer

Conversation

@JunaidAhamed-7777

@JunaidAhamed-7777 JunaidAhamed-7777 commented Nov 17, 2026 •

Copy link
Copy Markdown

An IP interface’s reverse DNS name should identify the host address. For example, IPv4Interface('192.0.2.1/24').reverse_pointer includes 1/24 today, which is not a valid DNS label. IPv6 interfaces have the same problem.

Use the existing reverse pointer formatter on the interface’s host address. This leaves standalone addresses and network objects unchanged.

Related to #91601. This fixes the interface cases only, not reverse DNS for whole networks.

Validation: ./python -m test test_ipaddress passed all 219 tests. The new regression had 9 failing subcases before the fix and checks IPv4, IPv6, scoped IPv6, and IPv4-mapped IPv6 across prefix lengths.

@python-cla-bot

python-cla-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant