[luci] missing OLSR Hna4 netmask value via LuCI
Manuel Munz
freifunk at somakoma.de
Fri Nov 18 18:35:13 CET 2011
On 16.11.2011 06:38, Kentaro Matsuyama wrote:
> Hi list!
>
> I have a question to solve below issue.
> When I set OLSR Hna4 option via LuCI OLSR page like this,
> Hna4
> Network address : 192.168.1.0, Netmask: 255.255.255.0
> But LuCI doesn't save netmask value actually because of 'placeholder'
> is set at netmask option only in the case of that user want to set
> netmask value as "255.255.255.0".
> And I noticed if I enter "255.255.255.0" even placeholder show
> "255.255.255.0", LuCI save netmask value correctly.
> But I think almost user will just leave it.
>
> -- luci/applications/luci-olsr/luasrc/model/cbi/olsr/olsrdhna.lua
> msk4 = hna4:option(Value, "netmask", translate("Netmask"))
> msk4.datatype = "ip4addr"
> msk4.placeholder = "255.255.255.0"
>
> On the other hand, olsrd init script of openwrt side has not default
> value of hna4 netmask. (packages/net/olsrd/files/olsrd.init)
> Then olsrd init script validate this hna4 netmask value on start, but
> in this case netmask value is empty. As a result, olsrd will fail to
> boot.
>
> # olsrd_write_hna4, packages/net/olsrd/files/olsrd.init
> config_get netmask "$cfg" netmask
> if ! validate_olsrd_option "$netmask"; then
> warning_invalid_value olsrd "$cfg" "netmask"
> return 0
> fi
>
> I think there is two way to fix this issue at least, just delete
> 'placeholder' at LuCI or to add default value "255.255.255.0" to olsrd
> init script.
> But I'm not sure which is the best way, so I wanna ask you guys which
> is the best way to fix in this case ?
>
> Regards,
> matsu
> _______________________________________________
Hi matsu,
i fixed this here: http://luci.subsignal.org/trac/changeset/7966/
and also backported it to 0.10 (with r7967).
Thanks, this was indeed a problem.
Regards, soma
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20111118/2b5ec879/attachment.pgp>
More information about the luci
mailing list