diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi
index fdf9bddaf..a63e1c2df 100644
--- a/html/cgi-bin/proxy.cgi
+++ b/html/cgi-bin/proxy.cgi
@@ -3004,7 +3004,8 @@ END
 					)
 				{
 					chomp $temp[1];
-					print FILE " ||\n     (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1]\"))";
+					my $tempmask = &Network::convert_prefix2netmask($temp[1]);
+					print FILE " ||\n     (isInNet(myIpAddress(), \"$temp[0]\", \"$tempmask\"))";
 				}
 			}
 
