luci-mod-network: routes: allow prefixes as route source
authorJo-Philipp Wich <jo@mein.io>
Thu, 28 Apr 2022 10:08:37 +0000 (12:08 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 28 Apr 2022 10:08:37 +0000 (12:08 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js

index b1939e264acddeccf37fc035c350c26661d29045..da1330aec89352bc7d4a1610b4064057b8c5bfb2 100644 (file)
@@ -98,7 +98,7 @@ return view.extend({
 
                        o = s.taboption('advanced', form.Value, 'source', _('Source'), _('Specifies the preferred source address when sending to destinations covered by the target'));
                        o.modalonly = true;
-                       o.datatype = (family == 6) ? 'ip6addr("nomask")' : 'ip4addr("nomask")';
+                       o.datatype = (family == 6) ? 'ip6addr' : 'ip4addr';
                        o.placeholder = E('em', _('auto'));
                        for (var i = 0; i < netDevs.length; i++) {
                                var addrs = (family == 6) ? netDevs[i].getIP6Addrs() : netDevs[i].getIPAddrs();