Skip to content

Return GeoIP network along with results - #117

Merged
blind-oracle merged 2 commits into
mainfrom
igor/geoip-network
Sep 10, 2026
Merged

blind-oracle merged 2 commits into
mainfrom
igor/geoip-network

Conversation

@blind-oracle

@blind-oracle blind-oracle commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

It returns the network with prefix that matched the GeoIP lookup.
This will help DNS GeoIP to scope responses more precisely.

Copilot AI left a comment

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.

🟢 Approval recommended

The API update is consistently applied and covered by representative network tests.

Pull request overview

Extends GeoIP lookups to return the matched network, enabling downstream DNS response scoping.

Changes:

  • Return IpNet alongside country and city results.
  • Preserve middleware behavior by extracting only the country code.
  • Add IPv4 and IPv6 network assertions.
File summaries
File Description
ic-bn-lib/src/geoip.rs Adds matched networks to GeoIP results and tests.
ic-bn-lib/src/http/middleware/request_meta.rs Adapts country lookup to the new tuple result.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ic-bn-lib/src/geoip.rs Outdated
@blind-oracle
blind-oracle merged commit b8d3c77 into main Sep 10, 2026
6 checks passed
@blind-oracle
blind-oracle deleted the igor/geoip-network branch September 10, 2026 12:41
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.

3 participants