From 8ea7eb86151cacf4bb653658267ffdfbadbab09d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 17 Mar 2011 17:40:40 +0000 Subject: [PATCH] libs/web: fix "port" datatype to allow port 0 --- libs/web/luasrc/cbi/datatypes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/web/luasrc/cbi/datatypes.lua b/libs/web/luasrc/cbi/datatypes.lua index 58b54de6e..b543d9fe5 100644 --- a/libs/web/luasrc/cbi/datatypes.lua +++ b/libs/web/luasrc/cbi/datatypes.lua @@ -94,7 +94,7 @@ end function port(val) val = tonumber(val) - return ( val and val >= 1 and val <= 65535 ) + return ( val and val >= 0 and val <= 65535 ) end function portrange(val) -- 2.11.0