summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua32
-rw-r--r--libs/luci-lib-ip/src/ip.c58
-rw-r--r--libs/luci-lib-ip/src/ip.luadoc2
-rw-r--r--modules/luci-base/po/ja/base.po16
-rw-r--r--protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua2
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua2
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua2
-rw-r--r--themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css3
8 files changed, 85 insertions, 32 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
index 2bf36cb278..18b106c32e 100644
--- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
+++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
@@ -676,13 +676,37 @@ local knownParams = {
"key_method",
{ 1, 2 },
translate("Enable TLS and assume client role") },
- { Value,
+ { DynamicList,
"tls_cipher",
- "DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:RC4-SHA:RC4-MD5:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC4-MD5",
+ {
+ "DHE-RSA-AES256-SHA",
+ "DHE-DSS-AES256-SHA",
+ "AES256-SHA",
+ "EDH-RSA-DES-CBC3-SHA",
+ "EDH-DSS-DES-CBC3-SHA",
+ "DES-CBC3-SHA",
+ "DHE-RSA-AES128-SHA",
+ "DHE-DSS-AES128-SHA",
+ "AES128-SHA",
+ "RC4-SHA",
+ "RC4-MD5",
+ "EDH-RSA-DES-CBC-SHA",
+ "EDH-DSS-DES-CBC-SHA",
+ "DES-CBC-SHA",
+ "EXP-EDH-RSA-DES-CBC-SHA",
+ "EXP-EDH-DSS-DES-CBC-SHA",
+ "EXP-DES-CBC-SHA",
+ "EXP-RC2-CBC-MD5",
+ "EXP-RC4-MD5"
+ },
translate("TLS cipher") },
- { Value,
+ { DynamicList,
"tls_ciphersuites",
- "TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256",
+ {
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_CHACHA20_POLY1305_SHA256"
+ },
translate("TLS 1.3 or newer cipher") },
{ Value,
"tls_timeout",
diff --git a/libs/luci-lib-ip/src/ip.c b/libs/luci-lib-ip/src/ip.c
index 854a0c09c2..188a70f144 100644
--- a/libs/luci-lib-ip/src/ip.c
+++ b/libs/luci-lib-ip/src/ip.c
@@ -1075,22 +1075,24 @@ static int cb_dump_route(struct nl_msg *msg, void *arg)
bitlen = AF_BITS(rt->rtm_family);
- if ((f->type && rt->rtm_type != f->type) ||
- (f->family && rt->rtm_family != f->family) ||
- (f->proto && rt->rtm_protocol != f->proto) ||
- (f->scope && rt->rtm_scope != f->scope) ||
- (f->iif && iif != f->iif) ||
- (f->oif && oif != f->oif) ||
- (f->table && table != f->table) ||
- diff_prefix(rt->rtm_family, from, rt->rtm_src_len,
- f->from_exact, &f->from) ||
- diff_prefix(rt->rtm_family, dst, rt->rtm_dst_len,
- f->dst_exact, &f->dst) ||
- diff_prefix(rt->rtm_family, gw, bitlen,
- false, &f->gw) ||
- diff_prefix(rt->rtm_family, src, bitlen,
- false, &f->src))
- goto out;
+ if (!f->get) {
+ if ((f->type && rt->rtm_type != f->type) ||
+ (f->family && rt->rtm_family != f->family) ||
+ (f->proto && rt->rtm_protocol != f->proto) ||
+ (f->scope && rt->rtm_scope != f->scope) ||
+ (f->iif && iif != f->iif) ||
+ (f->oif && oif != f->oif) ||
+ (f->table && table != f->table) ||
+ diff_prefix(rt->rtm_family, from, rt->rtm_src_len,
+ f->from_exact, &f->from) ||
+ diff_prefix(rt->rtm_family, dst, rt->rtm_dst_len,
+ f->dst_exact, &f->dst) ||
+ diff_prefix(rt->rtm_family, gw, bitlen,
+ false, &f->gw) ||
+ diff_prefix(rt->rtm_family, src, bitlen,
+ false, &f->src))
+ goto out;
+ }
if (s->callback)
lua_pushvalue(s->L, 2);
@@ -1216,10 +1218,15 @@ static int _route_dump(lua_State *L, struct dump_filter *filter)
nlmsg_append(msg, &rtm, sizeof(rtm), 0);
- if (filter->get)
+ if (filter->get) {
nla_put(msg, RTA_DST, AF_BYTES(filter->dst.family),
&filter->dst.addr.v6);
+ if (filter->src.family)
+ nla_put(msg, RTA_SRC, AF_BYTES(filter->src.family),
+ &filter->src.addr.v6);
+ }
+
nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, cb_dump_route, &s);
nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, cb_done, &s);
nl_cb_err(cb, NL_CB_CUSTOM, cb_error, &s);
@@ -1236,17 +1243,32 @@ static int _route_dump(lua_State *L, struct dump_filter *filter)
out:
nl_cb_put(cb);
- return (s.callback == 0);
+
+ if (s.callback)
+ return 0;
+
+ if (!filter->get)
+ return 1;
+
+ return (s.index > 0);
}
static int route_get(lua_State *L)
{
struct dump_filter filter = { .get = true };
const char *dest = luaL_checkstring(L, 1);
+ const char *from = luaL_optstring(L, 2, NULL);
if (!parse_cidr(dest, &filter.dst))
return _error(L, -1, "Invalid destination");
+ if (from && !parse_cidr(from, &filter.src))
+ return _error(L, -1, "Invalid source");
+
+ if (filter.src.family != 0 &&
+ filter.src.family != filter.dst.family)
+ return _error(L, -1, "Different source/destination family");
+
filter.family = filter.dst.family;
return _route_dump(L, &filter);
diff --git a/libs/luci-lib-ip/src/ip.luadoc b/libs/luci-lib-ip/src/ip.luadoc
index a2df96cdb5..afd171bebf 100644
--- a/libs/luci-lib-ip/src/ip.luadoc
+++ b/libs/luci-lib-ip/src/ip.luadoc
@@ -178,6 +178,8 @@ Determine the route leading to the given destination.
@name route
@param address A `luci.ip.cidr` instance or a string containing
a valid IPv4 or IPv6 range as specified by `luci.ip.new()`.
+@param source A `luci.ip.cidr` instance or a string containing
+the preferred source address for route selection (optional).
@return <p>Table containing the fields described below.</p>
<table id="routetable">
<tr><th>Field</th><th>Description</th></tr>
diff --git a/modules/luci-base/po/ja/base.po b/modules/luci-base/po/ja/base.po
index 24c13abd2d..8460642c52 100644
--- a/modules/luci-base/po/ja/base.po
+++ b/modules/luci-base/po/ja/base.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-06-10 03:40+0200\n"
-"PO-Revision-Date: 2019-07-13 18:28+0900\n"
+"PO-Revision-Date: 2019-08-06 02:52+0900\n"
"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n"
"Language-Team: \n"
"Language: ja\n"
@@ -320,7 +320,7 @@ msgstr ""
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:495
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:499
msgid "Absent Interface"
-msgstr ""
+msgstr "存在しないインターフェース"
#: protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua:19
msgid "Access Concentrator"
@@ -1443,7 +1443,7 @@ msgstr "宛先"
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:46
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:151
msgid "Destination zone"
-msgstr ""
+msgstr "宛先ゾーン"
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:54
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:177
@@ -2267,7 +2267,7 @@ msgstr ""
#: protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua:118
msgid "Host-Uniq tag content"
-msgstr ""
+msgstr "Host-Uniq タグ"
#: modules/luci-base/luasrc/view/lease_status.htm:71
#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js:31
@@ -3465,7 +3465,7 @@ msgstr "ネットワーク名が設定されていません"
#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_join.js:147
msgid "No networks in range"
-msgstr ""
+msgstr "範囲内にネットワークがありません"
#: themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm:173
#: themes/luci-theme-material/luasrc/view/themes/material/header.htm:211
@@ -3734,7 +3734,7 @@ msgstr "出力インターフェース"
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:46
#: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:151
msgid "Output zone"
-msgstr ""
+msgstr "出力ゾーン"
#: modules/luci-base/luasrc/model/cbi/admin_network/proto_dhcp.lua:63
#: modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua:155
@@ -4219,6 +4219,8 @@ msgstr "Radius認証サーバー"
#: protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua:119
msgid "Raw hex-encoded bytes. Leave empty unless your ISP require this"
msgstr ""
+"16 進数でエンコードされた、生のバイト値です。 ISP がこれを必須としない場合、"
+"空欄のままにします。"
#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js:83
msgid ""
@@ -6220,7 +6222,7 @@ msgstr "なし"
#: modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua:176
#: modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua:186
msgid "not present"
-msgstr ""
+msgstr "存在しません"
#: modules/luci-mod-network/luasrc/model/cbi/admin_network/vlan.lua:363
#: themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm:163
diff --git a/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua b/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua
index b2454838f9..60d8e2ebae 100644
--- a/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua
+++ b/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua
@@ -38,7 +38,7 @@ function proto.get_interfaces(self)
return nil
end
-function proto.contains_interface(self, ifname)
+function proto.contains_interface(self, ifc)
if self:is_floating() then
return (netmod:ifnameof(ifc) == self:ifname())
else
diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua b/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
index 7508e0d4b0..0b329d8a92 100644
--- a/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
+++ b/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
@@ -49,7 +49,7 @@ for _, p in ipairs({"dslite", "map", "464xlat"}) do
return nil
end
- function proto.contains_interface(self, ifname)
+ function proto.contains_interface(self, ifc)
return (netmod:ifnameof(ifc) == self:ifname())
end
end
diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua b/protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua
index 9a4396c5be..2fd0b11957 100644
--- a/protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua
+++ b/protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua
@@ -42,7 +42,7 @@ for _, p in ipairs({"6in4", "6to4", "6rd"}) do
return nil
end
- function proto.contains_interface(self, ifname)
+ function proto.contains_interface(self, ifc)
return (netmod:ifnameof(ifc) == self:ifname())
end
diff --git a/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css b/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css
index d6460532fa..fca731cadd 100644
--- a/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css
+++ b/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css
@@ -55,6 +55,8 @@
line-height: normal;
display: table-cell;
padding: .5em;
+ word-break: break-all;
+ word-wrap: break-word;
text-align: center;
vertical-align: middle;
}
@@ -136,6 +138,7 @@
.col-10 {
flex: 10 10 300px !important;
+ width: 60%;
}
/* dom 元素 */