9 Commits

Author SHA1 Message Date
Markus Prettner
c152f610ce
Fix negated IP addresses without subnet mask not being parsed correctly (#13854) 2025-04-08 19:21:57 -06:00
gnattu
9aec576c76
Typo
Co-authored-by: Cody Robibero <cody@robibe.ro>
2025-02-05 08:04:29 +08:00
gnattu
533ceeaaf2 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 16:52:17 +08:00
Bond_009
47f798827b Remove useless checks and dead code 2025-01-22 17:31:52 +01:00
Bond_009
3c3f0a765e Use new IPNetwork.TryParse function 2023-11-16 00:50:17 +01:00
Bond_009
635d67d458 Revert "Use System.Net.IPNetwork"
This reverts commit 117d05d288da1d412159a29c0cb8d5c8259e48ae.
2023-11-14 21:16:33 +01:00
Bond_009
b62b0ec2b5 Fix warnings 2023-11-14 21:14:21 +01:00
Bond_009
99e0d46ad9 Use System.Net.IPNetwork 2023-11-14 21:13:51 +01:00
Patrick Barron
9595636d61 Move network utilities to MediaBrowser.Common 2023-11-12 10:24:34 -05:00