Skip to content

Commit

Permalink
luci-proto-ipv6: Integrate ds-lite and ipip6
Browse files Browse the repository at this point in the history
ds-lite and ipip6 now use the same backend

Signed-off-by: Arayuki Mago <[email protected]>
  • Loading branch information
missing233 committed Feb 13, 2024
1 parent 81ccd89 commit 0708688
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions modules/luci-base/po/ja/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,7 @@ msgstr "Dual-Stack Lite (RFC6333)"
#: modules/luci-compat/luasrc/model/network/proto_4x6.lua:20
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:10
msgid "IPv4 over IPv6 (RFC2473)"
msgstr "IPv4 over IPv6 (RFC2473)"
msgstr "IPv4 over IPv6 (ipip6)"

#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js:354
msgid "Dump cache on SIGUSR1, include requesting IP."
Expand Down Expand Up @@ -5306,6 +5306,7 @@ msgstr "割り当てるローカル IPアドレス"
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gre.js:46
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gretap.js:46
#: protocols/luci-proto-ipip/htdocs/luci-static/resources/protocol/ipip.js:44
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:44
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6in4.js:40
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6rd.js:39
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6to4.js:39
Expand Down Expand Up @@ -7752,12 +7753,12 @@ msgid "Remote IPv4 address or FQDN"
msgstr "リモートIPv4アドレスまたはFQDN"

#: protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan6.js:40
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:40
msgid "Remote IPv6 address"
msgstr "リモートIPv6アドレス"

#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6.js:42
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6tap.js:42
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:40
msgid "Remote IPv6 address or FQDN"
msgstr "リモートIPv6アドレスまたはFQDN"

Expand Down Expand Up @@ -9551,7 +9552,6 @@ msgid "The length of the IPv6 prefix in bits"
msgstr "IPv6プレフィックスの長さ(ビット)"

#: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:165
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:44
msgid "The local IPv4 address"
msgstr "ローカルIPv4アドレス"

Expand Down
4 changes: 2 additions & 2 deletions modules/luci-base/po/zh_Hans/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -5272,6 +5272,7 @@ msgstr "要分配的本地 IP 地址"
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gre.js:46
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/gretap.js:46
#: protocols/luci-proto-ipip/htdocs/luci-static/resources/protocol/ipip.js:44
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:44
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6in4.js:40
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6rd.js:39
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6to4.js:39
Expand Down Expand Up @@ -7702,12 +7703,12 @@ msgid "Remote IPv4 address or FQDN"
msgstr "远程 IPv4 地址或 FQDN"

#: protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan6.js:40
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:40
msgid "Remote IPv6 address"
msgstr "远程 IPv6 地址"

#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6.js:42
#: protocols/luci-proto-gre/htdocs/luci-static/resources/protocol/grev6tap.js:42
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:40
msgid "Remote IPv6 address or FQDN"
msgstr "远程 IPv6 地址或 FQDN"

Expand Down Expand Up @@ -9471,7 +9472,6 @@ msgid "The length of the IPv6 prefix in bits"
msgstr "IPv6 前缀长度(位)"

#: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:165
#: protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/ipip6.js:44
msgid "The local IPv4 address"
msgstr "本地 IPv4 地址"

Expand Down
10 changes: 4 additions & 6 deletions modules/luci-compat/luasrc/model/network/proto_4x6.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ for _, p in ipairs({"dslite", "map", "464xlat", "ipip6"}) do
function proto.get_i18n(self)
if p == "dslite" then
return luci.i18n.translate("Dual-Stack Lite (RFC6333)")
elseif p == "ipip6" then
return luci.i18n.translate("IPv4 over IPv6 (RFC2473)")
elseif p == "map" then
return luci.i18n.translate("MAP / LW4over6")
elseif p == "464xlat" then
return luci.i18n.translate("464XLAT (CLAT)")
elseif p == "ipip6" then
return luci.i18n.translate("IPv4 over IPv6 (RFC2473)")
end
end

Expand All @@ -26,14 +26,12 @@ for _, p in ipairs({"dslite", "map", "464xlat", "ipip6"}) do
end

function proto.opkg_package(self)
if p == "dslite" then
if p == "dslite" or p == "ipip6" then
return "ds-lite"
elseif p == "map" then
return "map-t"
elseif p == "464xlat" then
return "464xlat"
elseif p == "ipip6" then
return "ipip6"
end
end

Expand All @@ -60,8 +58,8 @@ end

netmod:register_pattern_virtual("^464%-%w")
netmod:register_pattern_virtual("^ds%-%w")
netmod:register_pattern_virtual("^map%-%w")
netmod:register_pattern_virtual("^ipip6%-%w")
netmod:register_pattern_virtual("^map%-%w")

netmod:register_error_code("AFTR_DNS_FAIL", luci.i18n.translate("Unable to resolve AFTR host name"))
netmod:register_error_code("INVALID_MAP_RULE", luci.i18n.translate("MAP rule is invalid"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return network.registerProtocol('ipip6', {
},

getOpkgPackage: function () {
return 'ipip6';
return 'ds-lite';
},

isFloating: function () {
Expand All @@ -37,11 +37,11 @@ return network.registerProtocol('ipip6', {
renderFormOptions: function (s) {
var o;

o = s.taboption('general', form.Value, 'peeraddr', _('Remote IPv6 address'));
o = s.taboption('general', form.Value, 'peeraddr', _('Remote IPv6 address or FQDN'));
o.rmempty = false;
o.datatype = 'or(hostname,ip6addr("nomask"))';

o = s.taboption('general', form.Value, 'ip4ifaddr', _('The local IPv4 address'));
o = s.taboption('general', form.Value, 'ip4ifaddr', _('Local IPv4 address'));
o.rmempty = false;
o.datatype = 'ip4addr("nomask")';

Expand Down

0 comments on commit 0708688

Please sign in to comment.