luci-base: network.lua add ipv6-prefix-assignment support to get_status_by_address
authorpmelange <isprotejesvalkata@gmail.com>
Mon, 5 Nov 2018 13:03:35 +0000 (14:03 +0100)
committerpmelange <isprotejesvalkata@gmail.com>
Wed, 7 Nov 2018 17:41:58 +0000 (18:41 +0100)
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
modules/luci-base/luasrc/model/network.lua

index 7f7397032f95db38c8977ed508485867f0c7d680..49e1657aae46372d62935818df6ec19388011881 100644 (file)
@@ -855,6 +855,14 @@ function get_status_by_address(self, addr)
                                        end
                                end
                        end
+                       if s and s['ipv6-prefix-assignment'] then
+                               local a
+                               for _, a in ipairs(s['ipv6-prefix-assignment']) do
+                                       if a and a['local-address'] and a['local-address'].address == addr then
+                                               return net, s
+                                       end
+                               end
+                       end
                end
        end
 end