mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #5595] [CLOSED] Multiple IP fixes #10571
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/5595
Author: @BaronGreenback
Created: 3/22/2021
Status: ❌ Closed
Base:
master← Head:RemoveInvalidIP📝 Commits (10+)
588213bInvalid ip masks are now detected.6dca815Fixed IP6 subnets9010744Update MediaBrowser.Common/Net/IPNetAddress.cs1eb7fb5streamlined parsersa65971eFixed testsf1ff430Update IPNetAddress.cs68d5926Update MediaBrowser.Common/Net/IPHost.cse4febberemoved trailing spacese3ac096Permit /0 on limited IP addresses912188cRemoved IPAddress.None📊 Changes
15 files changed (+1153 additions, -1265 deletions)
View changed files
📝
Emby.Dlna/Main/DlnaEntryPoint.cs(+5 -3)📝
Jellyfin.Networking/Configuration/NetworkConfiguration.cs(+20 -0)📝
Jellyfin.Networking/Manager/NetworkManager.cs(+247 -348)📝
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs(+4 -8)📝
Jellyfin.Server/Program.cs(+1 -1)📝
MediaBrowser.Common/Net/INetworkManager.cs(+18 -82)📝
MediaBrowser.Common/Net/IPHost.cs(+123 -171)📝
MediaBrowser.Common/Net/IPNetAddress.cs(+401 -111)➖
MediaBrowser.Common/Net/IPObject.cs(+0 -395)➕
MediaBrowser.Common/Net/IpClassType.cs(+23 -0)📝
MediaBrowser.Common/Net/NetworkExtensions.cs(+36 -95)📝
RSSDP/SsdpDevicePublisher.cs(+11 -3)📝
tests/Jellyfin.Networking.Tests/NetworkManagerTests.cs(+11 -3)📝
tests/Jellyfin.Networking.Tests/NetworkParseTests.cs(+226 -45)📝
tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs(+27 -0)📄 Description
Improvement: Altered the code to detect /x subnet values that are invalid. eg. 10.10.10.10/255 or 10.10.10.10/65535 were being treated as valid. (see https://github.com/jellyfin/jellyfin/issues/5545)
Fix: Corrected an parsing issue with IP6 subnets, where 1 character would be removed from the subnet if the address was in [ ] (/127 becomes /12) Thanks to @Ullmie02.
Fix: IPHost names were not being auto resolved if ToString was being called.
Fix: IPAddress.None was being used to represent objects with no addresses. Null is now used. None =
Fix: wrong allowed proxy address applied it hostname is used.
Fix: Some IP6 addresses were being processed with a hardcoded /32 subnet instead or /128
Fix: Possible out of bounds exception due to IPv4 and IPv6 bytes comparisons exceeding allocation resulting in IsInNetwork incorrectly failing.
Fix: On rare occassions a collection might be created and returned before dns lookup has been completed, meaning address lists are invalid.
Includes fixes in: #5773: Permits multiple overlapping IP addresses and a workaround for dotnet networking bug.
Fix: Added networkManager to the mock AutoFixture for HDHomerunHostTests as it crashed IPNetAddress.
Fix: The internal bind address lists could contain external addresses.
Improvement: Added more network testing.
Improvement: Optimised and simplied IPHost.Parse and IPNetAddress.Parse.
Improvement: Normalised IPHost.HostName. ToString() is hostname [ipaddress1,ipaddress2,....] Thanks to @Ullmie02.
Improvement: Detects and handles the live removal of IP6 or IP4 support.
Simplification: Simplified and reduced code base by moving the IPObject code up a level into IPNetAddress.
Optimizations: Implemented suggestions by ReSharper.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.