luci-app-firewall: limit zone name length to 11 characters
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 28 Oct 2015 11:07:47 +0000 (13:07 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 28 Oct 2015 11:15:38 +0000 (13:15 +0200)
commita66c08849a95ad653635b9d8aefe5a8ecb2382f8
treefe6adc21282c2192427b587d7363ba4125079f7c
parent4b048cd18c766e3c67f9429d7f6b642460901d4c
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 87b6bb0dafbbe46dc7669356ac3db24aa975c4b7)
applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua