protocols: fix various interface patterns
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Nov 2017 13:20:50 +0000 (14:20 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Nov 2017 13:20:53 +0000 (14:20 +0100)
The virtual interface match patterns of various protocols were improperly
quoted, causing them to over- or undermatch.

Follow up of #1435.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
protocols/luci-proto-ipip/luasrc/model/network/proto_ipip.lua
protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua
protocols/luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua
protocols/luci-proto-ncm/luasrc/model/network/proto_ncm.lua
protocols/luci-proto-openconnect/luasrc/model/network/proto_openconnect.lua
protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua
protocols/luci-proto-qmi/luasrc/model/network/proto_qmi.lua
protocols/luci-proto-relay/luasrc/model/network/proto_relay.lua
protocols/luci-proto-vpnc/luasrc/model/network/proto_vpnc.lua

index 5c3761c9cb430786cec631ea5d56d34499640811..04d2e78b09f3ae700b1841ee386615665da3e388 100644 (file)
@@ -37,4 +37,4 @@ function proto.contains_interface(self, ifc)
         return (netmod:ifnameof(ifc) == self:ifname())
 end
 
-netmod:register_pattern_virtual("^ipip-%w")
+netmod:register_pattern_virtual("^ipip%-%w")
index d267ce9119e450e9e73a921672f49c22998f70b4..9a4396c5be431d33cfadd60789040c7fe0bc7547 100644 (file)
@@ -46,5 +46,5 @@ for _, p in ipairs({"6in4", "6to4", "6rd"}) do
                return (netmod:ifnameof(ifc) == self:ifname())
        end
 
-       netmod:register_pattern_virtual("^%s-%%w" % p)
+       netmod:register_pattern_virtual("^%s%%-%%w" % p)
 end
index 5896a278ce643001dd1ae1a648dbfb3befa9a73d..e0d7fd3e21a0a9503649eabf4ddb81153e6fd6b5 100644 (file)
@@ -46,4 +46,4 @@ function proto.contains_interface(self, ifname)
        end
 end
 
-netmod:register_pattern_virtual("^aiccu-%%w")
+netmod:register_pattern_virtual("^aiccu%-%w")
index 6c5b34e083771814097f3c820fe95396dc00cc31..4f835701ce126997de5a0113196a33f6ada39471 100644 (file)
@@ -58,4 +58,4 @@ function proto.contains_interface(self, ifc)
        return (netmod:ifnameof(ifc) == self:ifname())
 end
 
-netmod:register_pattern_virtual("^ncm-%%w")
+netmod:register_pattern_virtual("^ncm%-%w")
index 0af77d0140c8119273911ed599acfa00b5b37065..0944c7fe6ae633ee90c6a455be649fdec399e075 100644 (file)
@@ -42,4 +42,4 @@ function proto.contains_interface(self, ifc)
 
 end
 
-netmod:register_pattern_virtual("^vpn-%w")
+netmod:register_pattern_virtual("^vpn%-%w")
index 7bbd78fa1e6d91359cfc193a1512dd27d08f540a..1bcbd4808a0d82bdfc98e38e6dc5105b8e98dcf6 100644 (file)
@@ -90,5 +90,5 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp", "pppossh"}) d
                end
        end
 
-       netmod:register_pattern_virtual("^%s-%%w" % p)
+       netmod:register_pattern_virtual("^%s%%-%%w" % p)
 end
index cca8af109e4a0d70e7e0e0696b918fc995587ca1..8a28ad4716b0bdf54baac8225e58d9edd5b248a5 100644 (file)
@@ -48,4 +48,4 @@ function proto.contains_interface(self, ifc)
         return (netmod:ifnameof(ifc) == self:ifname())
 end
 
-netmod:register_pattern_virtual("^qmi-%w")
+netmod:register_pattern_virtual("^qmi%-%w")
index 5d40fc72d53f0de378604864425bed2c1b52d1fb..a2dabf9afeaa8a8fc03df506c0efe8a1a19748d8 100644 (file)
@@ -4,7 +4,7 @@
 local netmod = luci.model.network
 local device = luci.util.class(netmod.interface)
 
-netmod:register_pattern_virtual("^relay-%w")
+netmod:register_pattern_virtual("^relay%-%w")
 
 local proto = netmod:register_protocol("relay")
 
index f4cae0bd2ab0f81cc5bf9b13d1cf9ceed1d8b3f4..6c3136e384298ed251d8144819c34b9d54930610 100644 (file)
@@ -42,5 +42,5 @@ function proto.contains_interface(self, ifc)
 
 end
 
-netmod:register_pattern_virtual("^vpn-%w")
+netmod:register_pattern_virtual("^vpn%-%w")