Commit Graph

13 Commits

Author SHA1 Message Date
gnattu
f536e08e14 Fix subnet contains check
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.
2025-02-04 07:07:21 +08:00
Tim Eisele
e6c6441abf Take subnet size into account 2025-01-27 10:59:50 +01:00
Tim Eisele
4d89a095ed Fix interface ordering again 2025-01-27 10:55:30 +01:00
Shadowghost
9c7d735a96 Fix interface selection 2025-01-17 09:41:32 +01:00
gnattu
2a96b8b34b Properly check LAN IP in HasRemoteAccess
We cannot simply use the subnet list to check if the IP is in LAN as it does not handle special cases like IPv4MappedToIPv6 and IPv6 loopback addresses.
2024-12-08 22:06:11 +08:00
Alexander Gramiak
76ac1e6143 NetworkManager: Use MemberNotNull attribute
Added in .NET 5, this attribute allows for the compiler to recognize
that InitializeLan (and by extension, UpdateSettings) will initialize
the specified fields.
2024-10-05 15:28:30 -06:00
gnattu
987dbe98c8 cli: add option to disable network change detection (#11253) 2024-09-09 13:17:10 -06:00
Shadowghost
9c96ce5f6e Backport pull request #12094 from jellyfin/release-10.9.z
Map IPv6 mapped IPv4 addresses back to IPv4 before running checks

Original-merge: f097aad01e

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-06-23 11:40:54 -04:00
gnattu
e7145acd56 Backport pull request #11766 from jellyfin/release-10.9.z
Filter invalid IPs on external interface matching

Original-merge: 2eece01acc

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-05-25 11:46:13 -04:00
Shadowghost
a7b2b92f2b Backport pull request #11671 from jellyfin/release-10.9.z
Fix network binding

Original-merge: 430d450828

Merged-by: nielsvanvelzen <nielsvanvelzen@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-05-17 13:51:48 -04:00
gnattu
69d4886697 Backport pull request #11587 from jellyfin/release-10.9.z
Fix network config

Original-merge: f396a95f05

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-05-13 12:47:38 -04:00
Patrick Barron
eea676429b Use file-scoped namespaces in Jellyfin.Networking 2023-11-30 12:26:37 -05:00
Patrick Barron
9597648ce3 Move Jellyfin.Networking to src 2023-11-30 11:57:07 -05:00