From: Jo-Philipp Wich Date: Thu, 17 Mar 2011 17:40:40 +0000 (+0000) Subject: libs/web: fix "port" datatype to allow port 0 X-Git-Tag: 0.11.0~2194 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=8ea7eb86151cacf4bb653658267ffdfbadbab09d;hp=ea7f4ccb9fb531d69e6c50e76e37c59d853357e5 libs/web: fix "port" datatype to allow port 0 --- 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)