mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Map IPv6 mapped IPv4 addresses back to IPv4 before running checks
This commit is contained in:
parent
b25d6d1e48
commit
56104d3042
@ -919,10 +919,14 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(address);
|
ArgumentNullException.ThrowIfNull(address);
|
||||||
|
|
||||||
// See conversation at https://github.com/jellyfin/jellyfin/pull/3515.
|
// Map IPv6 mapped IPv4 back to IPv4 (happens if Kestrel runs in dual-socket mode)
|
||||||
|
if (address.IsIPv4MappedToIPv6)
|
||||||
|
{
|
||||||
|
address = address.MapToIPv4();
|
||||||
|
}
|
||||||
|
|
||||||
if ((TrustAllIPv6Interfaces && address.AddressFamily == AddressFamily.InterNetworkV6)
|
if ((TrustAllIPv6Interfaces && address.AddressFamily == AddressFamily.InterNetworkV6)
|
||||||
|| address.Equals(IPAddress.Loopback)
|
|| IPAddress.IsLoopback(address))
|
||||||
|| address.Equals(IPAddress.IPv6Loopback))
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user