From 0be0f069077fb01038b34446afea510d26b8782e Mon Sep 17 00:00:00 2001 From: Vladislav Grigoryev Date: Sat, 4 Sep 2021 00:24:48 +0300 Subject: luci-mod-network: fix route and rule options Allow adding routes with unspecified interface. This is required for prohibit, blackhole and unreachable routes. Allow adding routes with loopback interface. This can work as a blackhole route. Fix netmask to prefix conversion for the routes. Identify the IP family by the UCI section type. Avoid setting the routing table textvalue for the rules. The rules should target none table unless specified otherwise. Signed-off-by: Vladislav Grigoryev --- modules/luci-base/po/templates/base.pot | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'modules/luci-base/po/templates') diff --git a/modules/luci-base/po/templates/base.pot b/modules/luci-base/po/templates/base.pot index 40cb923ca4..40fe4d76fc 100644 --- a/modules/luci-base/po/templates/base.pot +++ b/modules/luci-base/po/templates/base.pot @@ -493,7 +493,7 @@ msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:633 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1523 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:39 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:126 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:127 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:924 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:988 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js:241 @@ -1656,7 +1656,7 @@ msgstr "" msgid "Designated master" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:158 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:159 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js:386 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js:71 msgid "Destination" @@ -1742,8 +1742,8 @@ msgstr "" msgid "Directory" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:112 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:197 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:113 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:195 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:897 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:937 msgid "Disable" @@ -2496,7 +2496,7 @@ msgstr "" msgid "Firewall Status" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:178 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:176 msgid "Firewall mark" msgstr "" @@ -2668,7 +2668,7 @@ msgstr "" msgid "GRETAP tunnel over IPv6" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:74 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:75 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/30_network.js:44 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:188 msgid "Gateway" @@ -2686,7 +2686,7 @@ msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js:251 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:477 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:38 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:125 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:126 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js:240 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js:108 msgid "General Settings" @@ -3006,7 +3006,7 @@ msgstr "" msgid "IPv4 Routing" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:119 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:120 msgid "IPv4 Rules" msgstr "" @@ -3105,7 +3105,7 @@ msgstr "" msgid "IPv6 Routing" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:119 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:120 msgid "IPv6 Rules" msgstr "" @@ -3318,7 +3318,7 @@ msgstr "" msgid "Incoming checksum" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:143 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:144 msgid "Incoming interface" msgstr "" @@ -3536,7 +3536,7 @@ msgstr "" msgid "Invalid username and/or password! Please try again." msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:193 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:191 msgid "Invert match" msgstr "" @@ -3568,7 +3568,7 @@ msgstr "" msgid "Joining Network: %q" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:173 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:171 msgid "Jump to rule" msgstr "" @@ -4034,7 +4034,7 @@ msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js:580 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1418 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:85 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:86 #: protocols/luci-proto-vpnc/htdocs/luci-static/resources/protocol/vpnc.js:53 #: protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js:92 msgid "MTU" @@ -4174,7 +4174,7 @@ msgstr "" msgid "Method to determine link status" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:78 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:79 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:189 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:215 msgid "Metric" @@ -4736,7 +4736,7 @@ msgstr "" msgid "On-State Delay" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:108 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:109 msgid "On-link" msgstr "" @@ -4923,7 +4923,7 @@ msgstr "" msgid "Outgoing checksum" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:154 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:155 msgid "Outgoing interface" msgstr "" @@ -5341,7 +5341,7 @@ msgstr "" msgid "Prefix Delegated" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:188 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:186 msgid "Prefix suppressor" msgstr "" @@ -5384,7 +5384,7 @@ msgid "Primary becomes active slave whenever it comes back up (always, 0)" msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js:508 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:128 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:129 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:197 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:223 msgid "Priority" @@ -5887,7 +5887,7 @@ msgstr "" msgid "Rule" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:135 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:136 msgid "Rule type" msgstr "" @@ -6242,8 +6242,8 @@ msgid "" "instructions." msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:98 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:147 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:99 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:148 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js:385 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js:70 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:214 @@ -6705,8 +6705,8 @@ msgstr "" msgid "TX queue length" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:90 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:165 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:91 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:166 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js:18 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:190 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js:216 @@ -7274,7 +7274,7 @@ msgstr "" msgid "Type" msgstr "" -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:183 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:181 msgid "Type of service" msgstr "" @@ -8005,16 +8005,16 @@ msgid "ZRam Size" msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js:440 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:151 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:162 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:152 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:163 msgid "any" msgstr "" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1463 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1471 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1476 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:101 -#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:132 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:102 +#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:133 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:1230 #: protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js:79 #: protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js:48 -- cgit v1.2.3