From 4dca3fe96e714302e3c5efaa2c72ec0ebc9a7586 Mon Sep 17 00:00:00 2001 From: Hubert Date: Tue, 10 Nov 2015 14:36:42 +0100 Subject: [PATCH] fix: NeighSet don't replace neigh when it exists --- neigh_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neigh_linux.go b/neigh_linux.go index 620a0ee..505d215 100644 --- a/neigh_linux.go +++ b/neigh_linux.go @@ -73,7 +73,7 @@ func NeighAdd(neigh *Neigh) error { // NeighAdd will add or replace an IP to MAC mapping to the ARP table // Equivalent to: `ip neigh replace....` func NeighSet(neigh *Neigh) error { - return neighAdd(neigh, syscall.NLM_F_CREATE) + return neighAdd(neigh, syscall.NLM_F_CREATE|syscall.NLM_F_REPLACE) } // NeighAppend will append an entry to FDB