[cfg] Add "none" as "trusted_networks" option

This commit is contained in:
ejurgensen 2024-07-05 16:00:47 +02:00
parent bcdd3b2f65
commit be1bacf278
2 changed files with 3 additions and 3 deletions

View File

@ -40,8 +40,8 @@ general {
# Sets who is allowed to connect without authorisation. This applies to # Sets who is allowed to connect without authorisation. This applies to
# client types like Remotes, DAAP clients (iTunes) and to the web # client types like Remotes, DAAP clients (iTunes) and to the web
# interface. Options are "any", "lan", "localhost" or the prefix to one # interface. Options are "any", "lan", "localhost", "none" or the prefix
# or more ipv4/6 networks. The default is { "lan" } # to one or more ipv4/6 networks. The default is { "lan" }
# trusted_networks = { "lan" } # trusted_networks = { "lan" }
# Enable/disable IPv6 # Enable/disable IPv6

View File

@ -239,7 +239,7 @@ net_peer_address_is_trusted(union net_sockaddr *naddr)
{ {
network = cfg_getnstr(section, "trusted_networks", i); network = cfg_getnstr(section, "trusted_networks", i);
if (!network || network[0] == '\0') if (!network || network[0] == '\0' || strcmp(network, "none") == 0)
return false; return false;
if (strcmp(network, "any") == 0) if (strcmp(network, "any") == 0)