rtnetlink: Return neighbor even if addr is missing
There are valid configurations that return these type of messages from
the kernel and we don't want to fail for them
Change-Id: I74a0fd519e553c2e4bc3e114e7563fe93d8facf6
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/rtnetlink_server.cpp b/src/rtnetlink_server.cpp
index 4645367..5afe637 100644
--- a/src/rtnetlink_server.cpp
+++ b/src/rtnetlink_server.cpp
@@ -123,9 +123,9 @@
{
it->second->addStaticNeigh(info);
}
- else
+ else if (info.addr)
{
- it->second->staticNeighbors.erase(info.addr);
+ it->second->staticNeighbors.erase(*info.addr);
}
}