Updated to latest version of code.

This commit is contained in:
Greenback 2020-10-30 14:06:11 +00:00
parent 6dc2936d9c
commit ec57eeff2b
4 changed files with 6 additions and 6 deletions

View File

@ -297,7 +297,7 @@ namespace Emby.Dlna.Main
CacheLifetime = TimeSpan.FromSeconds(1800), // How long SSDP clients can cache this info. CacheLifetime = TimeSpan.FromSeconds(1800), // How long SSDP clients can cache this info.
Location = uri, // Must point to the URL that serves your devices UPnP description document. Location = uri, // Must point to the URL that serves your devices UPnP description document.
Address = address.Address, Address = address.Address,
SubnetMask = address.Mask, PrefixLength = address.PrefixLength,
FriendlyName = "Jellyfin", FriendlyName = "Jellyfin",
Manufacturer = "Jellyfin", Manufacturer = "Jellyfin",
ModelName = "Jellyfin Server", ModelName = "Jellyfin Server",

View File

@ -52,7 +52,7 @@ namespace Jellyfin.Server.Middleware
if (remoteAddressFilter.Count > 0 && !networkManager.IsInLocalNetwork(remoteIp)) if (remoteAddressFilter.Count > 0 && !networkManager.IsInLocalNetwork(remoteIp))
{ {
// remoteAddressFilter is a whitelist or blacklist. // remoteAddressFilter is a whitelist or blacklist.
bool isListed = remoteAddressFilter.Contains(remoteIp); bool isListed = remoteAddressFilter.ContainsAddress(remoteIp);
if (!serverConfigurationManager.GetNetworkConfiguration().IsRemoteIPFilterBlacklist) if (!serverConfigurationManager.GetNetworkConfiguration().IsRemoteIPFilterBlacklist)
{ {
// Black list, so flip over. // Black list, so flip over.

View File

@ -302,8 +302,8 @@ namespace Rssdp.Infrastructure
foreach (var device in deviceList) foreach (var device in deviceList)
{ {
var root = device.ToRootDevice(); var root = device.ToRootDevice();
var source = new IPNetAddress(root.Address, root.SubnetMask); var source = new IPNetAddress(root.Address, root.PrefixLength);
var destination = new IPNetAddress(remoteEndPoint.Address, root.SubnetMask); var destination = new IPNetAddress(remoteEndPoint.Address, root.PrefixLength);
if (!_sendOnlyMatchedHost || source.NetworkAddress.Equals(destination.NetworkAddress)) if (!_sendOnlyMatchedHost || source.NetworkAddress.Equals(destination.NetworkAddress))
{ {
SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken); SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken);

View File

@ -45,9 +45,9 @@ namespace Rssdp
public IPAddress Address { get; set; } public IPAddress Address { get; set; }
/// <summary> /// <summary>
/// Gets or sets the SubnetMask used to check if the received message from same interface with this device/tree. Required. /// Gets or sets the prefix length used to check if the received message from same interface with this device/tree. Required.
/// </summary> /// </summary>
public IPAddress SubnetMask { get; set; } public byte PrefixLength { get; set; }
/// <summary> /// <summary>
/// The base URL to use for all relative url's provided in other propertise (and those of child devices). Optional. /// The base URL to use for all relative url's provided in other propertise (and those of child devices). Optional.