[PR #13489] [MERGED] Fix subnet contains check #13599

Closed
opened 2026-02-07 07:15:52 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/13489
Author: @gnattu
Created: 2/4/2025
Status: Merged
Merged: 2/12/2025
Merged by: @crobibero

Base: release-10.10.zHead: fix-subnet-detect


📝 Commits (3)

📊 Changes

1 file changed (+32 additions, -23 deletions)

View changed files

📝 src/Jellyfin.Networking/Manager/NetworkManager.cs (+32 -23)

📄 Description

We are still using Subnet.Contains a lot but that does not handle IPv4 mapped to IPv6 addresses at all. It was partially fixed by #12094 in local network checking, but it may not always happen on LAN.

Also make all local network checking to use IsInLocalNetwork method instead of just performing Subnet.Contains which is not accurate.

Filter out all link-local addresses for external interface matching.

Changes

Issues


🔄 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/jellyfin/jellyfin/pull/13489 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 2/4/2025 **Status:** ✅ Merged **Merged:** 2/12/2025 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `release-10.10.z` ← **Head:** `fix-subnet-detect` --- ### 📝 Commits (3) - [`f536e08`](https://github.com/jellyfin/jellyfin/commit/f536e08e14cfc82a501e927562c7c6209cef7add) Fix subnet contains check - [`070d04c`](https://github.com/jellyfin/jellyfin/commit/070d04c1b26b61f1bc6dca15a965cdd8c37dfa0d) Typo - [`99006c3`](https://github.com/jellyfin/jellyfin/commit/99006c370f2b3b0b72447671bf24c8b09513ba88) Fix more typo ### 📊 Changes **1 file changed** (+32 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/Jellyfin.Networking/Manager/NetworkManager.cs` (+32 -23) </details> ### 📄 Description We are still using `Subnet.Contains` a lot but that does not handle IPv4 mapped to IPv6 addresses at all. It was partially fixed by #12094 in local network checking, but it may not always happen on LAN. Also make all local network checking to use IsInLocalNetwork method instead of just performing `Subnet.Contains` which is not accurate. Filter out all link-local addresses for external interface matching. <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:15:52 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13599