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>
Thu, 6 Dec 2018 18:06:04 +0000 (19:06 +0100)
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
modules/luci-base/luasrc/model/network.lua

index cce559aab1740166f9efa82989f01b87f9f5c3db..840940a9fe7a8dd84714b1e2aa1181e695efe6e4 100644 (file)
@@ -852,6 +852,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