network_manager: Add neighbors to undiscovered interfaces
This will make it possible to disable neighbor dumping on interface
creation.
Change-Id: I3c6ca49774730b96a33c3c36c7c425f52c5c2e2a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index bc33243..7f54f5e 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
@@ -9,7 +9,6 @@
#include <fmt/compile.h>
#include <fmt/format.h>
-#include <linux/neighbour.h>
#include <linux/rtnetlink.h>
#include <net/if.h>
@@ -207,10 +206,6 @@
void EthernetInterface::addStaticNeigh(const NeighborInfo& info)
{
- if ((info.state & NUD_PERMANENT) == 0)
- {
- return;
- }
if (!info.mac || !info.addr)
{
auto msg = fmt::format("Missing neighbor mac on {}\n", interfaceName());
@@ -228,7 +223,7 @@
staticNeighbors.clear();
for (const auto& neighbor : system::getNeighbors({.ifidx = ifIdx}))
{
- addStaticNeigh(neighbor);
+ manager.addNeighbor(neighbor);
}
}