From aea89f6b5ecf3640e48b4e18287a5a4cc080b7dd Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Tue, 11 Apr 2023 16:49:07 -0400 Subject: [PATCH] net/upnp: Allow subnet mask 0 in rules --- net/upnp/src/www/services_upnp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/upnp/src/www/services_upnp.php b/net/upnp/src/www/services_upnp.php index bbd1436e9..3a73b5700 100644 --- a/net/upnp/src/www/services_upnp.php +++ b/net/upnp/src/www/services_upnp.php @@ -39,7 +39,7 @@ function miniupnpd_validate_ip($ip) $ip_array = []; $ip_array = explode('/', $ip); if (count($ip_array) == 2) { - if ($ip_array[1] < 1 || $ip_array[1] > 32) { + if ($ip_array[1] < 0 || $ip_array[1] > 32) { return false; } } elseif (count($ip_array) != 1) {