[PR #14190] [CLOSED] Fix using subnets from interfaces as lan networks #13876

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/14190
Author: @Elsensee
Created: 5/29/2025
Status: Closed

Base: masterHead: iface-subnets


📝 Commits (1)

  • e4ea5f8 Fix using subnets from interfaces as lan networks

📊 Changes

1 file changed (+11 additions, -26 deletions)

View changed files

📝 src/Jellyfin.Networking/Manager/NetworkManager.cs (+11 -26)

📄 Description

Changes
Instead of looking at the spec-RFC LAN addresses, the LAN subnets are now derived from the unicast addresses assigned to the network interfaces. Now, all addresses are considered LAN for which a router is technically not required, so even IPv6-GUAs within the same subnet (mostly /64). As a side effect, RFC1918-subnets which are not on link, are no more included — so a host on a 192.168.x.0/24 will no longer consider 10.0.0.0/8 local, if there exists no interface with that address. (And I inverted the if for better code readability)
Also, I have applied the default configuration to the detectNetworkChange variable in case TryParse fails, because in the case of dynamically changing GUAs, this would lead to the wrong behavior which would only be fixable by a restart of Jellyfin.

Issues
Fixes #14189


🔄 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/14190 **Author:** [@Elsensee](https://github.com/Elsensee) **Created:** 5/29/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `iface-subnets` --- ### 📝 Commits (1) - [`e4ea5f8`](https://github.com/jellyfin/jellyfin/commit/e4ea5f8a548963cf7265014a8d12f3442ad8a361) Fix using subnets from interfaces as lan networks ### 📊 Changes **1 file changed** (+11 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `src/Jellyfin.Networking/Manager/NetworkManager.cs` (+11 -26) </details> ### 📄 Description **Changes** Instead of looking at the spec-RFC LAN addresses, the LAN subnets are now derived from the unicast addresses assigned to the network interfaces. Now, all addresses are considered LAN for which a router is technically not required, so even IPv6-GUAs within the same subnet (mostly /64). As a side effect, RFC1918-subnets which are not on link, are no more included — so a host on a 192.168.x.0/24 will no longer consider 10.0.0.0/8 local, if there exists no interface with that address. (And I inverted the `if` for better code readability) Also, I have applied the default configuration to the `detectNetworkChange` variable in case `TryParse` fails, because in the case of dynamically changing GUAs, this would lead to the wrong behavior which would only be fixable by a restart of Jellyfin. **Issues** Fixes #14189 --- <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:20:35 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13876