summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/core/luasrc/model/network.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua
index 129f70d71..68ad04fae 100644
--- a/libs/core/luasrc/model/network.lua
+++ b/libs/core/luasrc/model/network.lua
@@ -852,7 +852,9 @@ function interface.get_network(self)
if not self.network then
local net
for _, net in ipairs(_M:get_networks()) do
- if net:contains_interface(self.ifname) then
+ if net:contains_interface(self.ifname) or
+ net:ifname() == self.ifname
+ then
self.network = net
return net
end