summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-12 17:00:12 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-12 18:10:59 +0200
commit80ed1af639b60d8ea2376b1bdc4ce393117b26cd (patch)
tree9bd17888665931cc74c2e64d04a5af71b6254ef7
parent85bc16605de9877f7e5fc4546c1c7a8837bd888a (diff)
luci-proto-ipv6: register further network error codes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua17
1 files changed, 9 insertions, 8 deletions
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 ad99073ad6..7508e0d4b0 100644
--- a/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
+++ b/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
@@ -52,12 +52,13 @@ for _, p in ipairs({"dslite", "map", "464xlat"}) do
function proto.contains_interface(self, ifname)
return (netmod:ifnameof(ifc) == self:ifname())
end
-
- if p == "dslite" then
- netmod:register_pattern_virtual("^ds%-%w")
- elseif p == "map" then
- netmod:register_pattern_virtual("^map%-%w")
- elseif p == "464xlat" then
- netmod:register_pattern_virtual("^464%-%w")
- end
end
+
+netmod:register_pattern_virtual("^464%-%w")
+netmod:register_pattern_virtual("^ds%-%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"))
+netmod:register_error_code("NO_MATCHING_PD", luci.i18n.translate("No matching prefix delegation"))
+netmod:register_error_code("UNSUPPORTED_TYPE", luci.i18n.translate("Unsupported MAP type"))