luci-proto-ipv6: fix patterns in proto_4x6.lua 1435/head
authorMartin Schiller <ms@dev.tdt.de>
Fri, 10 Nov 2017 12:49:45 +0000 (13:49 +0100)
committerMartin Schiller <ms@dev.tdt.de>
Fri, 10 Nov 2017 12:49:45 +0000 (13:49 +0100)
The dash '-' needs to be escaped by a '%', otherwise it will
be interpreted as minus, which means '0 or more repetitions'.

This fixes LEDE FS#1157.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua

index d876d69ba81d86610dd166310e1cd73935d4b954..ad99073ad67fbdce624e68ee26f362b8fb0269af 100644 (file)
@@ -54,10 +54,10 @@ for _, p in ipairs({"dslite", "map", "464xlat"}) do
        end
 
        if p == "dslite" then
-               netmod:register_pattern_virtual("^ds-%w")
+               netmod:register_pattern_virtual("^ds%-%w")
        elseif p == "map" then
-               netmod:register_pattern_virtual("^map-%w")
+               netmod:register_pattern_virtual("^map%-%w")
        elseif p == "464xlat" then
-               netmod:register_pattern_virtual("^464-%w")
+               netmod:register_pattern_virtual("^464%-%w")
        end
 end