[PR #354] [CLOSED] (waiting) filter returned IPs by network scope #1385

Closed
opened 2026-03-16 02:03:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/354
Author: @bluejekyll
Created: 3/5/2018
Status: Closed

Base: masterHead: protect_localhost


📝 Commits (1)

  • bcca2d9 filter lookup_ip to desired network scope

📊 Changes

3 files changed (+110 additions, -27 deletions)

View changed files

📝 resolver/src/lookup.rs (+2 -2)
📝 resolver/src/lookup_ip.rs (+101 -18)
📝 resolver/src/lookup_state.rs (+7 -7)

📄 Description

fixes #347

This PR now only filters results of a query based on network scope, today LookupIp has one method:

fn iter(&self) -> LookupIpIter

which returns an Iterator over the resultant IpAddrs. This adds these methods:

fn global_iter(&self) -> GlobalLookupIpIter; // only return external ips
fn private_iter(&self) -> PrivateLookupIpIter; // only return private and localhost ips

This change is on hold until clarity on what is truly desired is found, see #347


🔄 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/hickory-dns/hickory-dns/pull/354 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 3/5/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `protect_localhost` --- ### 📝 Commits (1) - [`bcca2d9`](https://github.com/hickory-dns/hickory-dns/commit/bcca2d964e786a0d2a54eb1082fdbe2604ca5369) filter lookup_ip to desired network scope ### 📊 Changes **3 files changed** (+110 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `resolver/src/lookup.rs` (+2 -2) 📝 `resolver/src/lookup_ip.rs` (+101 -18) 📝 `resolver/src/lookup_state.rs` (+7 -7) </details> ### 📄 Description fixes #347 This PR now only filters results of a query based on network scope, today `LookupIp` has one method: ```rust fn iter(&self) -> LookupIpIter ``` which returns an `Iterator` over the resultant `IpAddr`s. This adds these methods: ```rust fn global_iter(&self) -> GlobalLookupIpIter; // only return external ips fn private_iter(&self) -> PrivateLookupIpIter; // only return private and localhost ips ``` ---- This change is on hold until clarity on what is truly desired is found, see #347 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:03:30 +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/hickory-dns#1385
No description provided.