[PR #171] [MERGED] Handle IPv4-mapped IPv6 addresses #398

Closed
opened 2026-02-26 10:31:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nsupdate-info/nsupdate.info/pull/171
Author: @jhass
Created: 9/29/2014
Status: Merged
Merged: 9/29/2014
Merged by: @ThomasWaldmann

Base: masterHead: mapped_ip


📝 Commits (1)

  • 5e637b1 Handle IPv4-mapped IPv6 addresses

📊 Changes

4 files changed (+27 additions, -7 deletions)

View changed files

📝 nsupdate/api/views.py (+5 -4)
📝 nsupdate/context_processors.py (+2 -1)
nsupdate/main/iptools.py (+17 -0)
📝 nsupdate/main/views.py (+3 -2)

📄 Description

Some reverse proxy configurations pass REMOTE_ADDR
as a IPv4-mapped IPv6 address when listening on a
IPv6 socket. This patch converts such a mapped
address into a IPv4 address at all usages of
REMOTE_ADDR. It handles both, the ::ffff:192.0.2.128
format as well as the deprecated ::192.0.2.128 format.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nsupdate-info/nsupdate.info/pull/171 **Author:** [@jhass](https://github.com/jhass) **Created:** 9/29/2014 **Status:** ✅ Merged **Merged:** 9/29/2014 **Merged by:** [@ThomasWaldmann](https://github.com/ThomasWaldmann) **Base:** `master` ← **Head:** `mapped_ip` --- ### 📝 Commits (1) - [`5e637b1`](https://github.com/nsupdate-info/nsupdate.info/commit/5e637b14c9a41c84a2eed6fbefdd0a9aa4156495) Handle IPv4-mapped IPv6 addresses ### 📊 Changes **4 files changed** (+27 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `nsupdate/api/views.py` (+5 -4) 📝 `nsupdate/context_processors.py` (+2 -1) ➕ `nsupdate/main/iptools.py` (+17 -0) 📝 `nsupdate/main/views.py` (+3 -2) </details> ### 📄 Description Some reverse proxy configurations pass REMOTE_ADDR as a IPv4-mapped IPv6 address when listening on a IPv6 socket. This patch converts such a mapped address into a IPv4 address at all usages of REMOTE_ADDR. It handles both, the ::ffff:192.0.2.128 format as well as the deprecated ::192.0.2.128 format. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 10:31:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#398
No description provided.