[ufp] plugin_neigh: add also mac addresses from RTM_GETLINK
Christian Korber
ckorber at tdt.de
Mon May 18 07:08:32 PDT 2026
To also recognize mac addresses from interfaces this commit is added.
Signed-off-by: Christian Korber <ckorber at tdt.de>
---
modules/plugin_neigh.uc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/plugin_neigh.uc b/modules/plugin_neigh.uc
index a01a7fc..ac3bbe1 100644
--- a/modules/plugin_neigh.uc
+++ b/modules/plugin_neigh.uc
@@ -9,6 +9,11 @@ function get_arp_cache() {
if (data.lladdr && data.dst)
ret[data.dst] = data.lladdr;
+ cache = rtnl.request(rtnl.const.RTM_GETLINK, rtnl.const.NLM_F_DUMP, { family: AF_INET });
+ for (let data in cache)
+ if (data.address)
+ ret[data.address] = data.address;
+
return ret;
}
--
2.47.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6005 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20260518/cead4688/attachment.bin>
More information about the openwrt-devel
mailing list