luci-app-firewall: limit zone name length to 11 characters
Change the maximum length of a firewall zone name from 14 to 11 characters.
Longer names break iptables rule generation (max. 29 chars are allowed).
XT_EXTENSION_MAXNAMELEN = 29
29 - sizeof("postrouting_") - sizeof("_rule") - sizeof("\0") = 11
References to:
https://github.com/openwrt/luci/issues/507
https://dev.openwrt.org/ticket/20380
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 87b6bb0daf
)
This commit is contained in:
parent
4b048cd18c
commit
a66c08849a
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ s:tab("advanced", translate("Advanced Settings"))
|
|||
name = s:taboption("general", Value, "name", translate("Name"))
|
||||
name.optional = false
|
||||
name.forcewrite = true
|
||||
name.datatype = "and(uciname,maxlength(14))"
|
||||
name.datatype = "and(uciname,maxlength(11))"
|
||||
|
||||
function name.write(self, section, value)
|
||||
if zone:name() ~= value then
|
||||
|
|
Loading…
Reference in a new issue