From 1fc8d021edc6d60b49b607c917d23b0655a69d47 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 6 Aug 2019 15:19:15 +0200 Subject: [PATCH] protocols: fix contains_interface() implementation in several backends Signed-off-by: Jo-Philipp Wich --- protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua | 2 +- protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua | 2 +- protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 b2454838f..60d8e2eba 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 7508e0d4b..0b329d8a9 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 9a4396c5b..2fd0b1195 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 -- 2.25.1