plugins: replace arping package with arp_notify

this replaces the arping package with the linux arp_notify feature.

Resolves: #588
Signed-off-by: Michael Zappa <Michael.Zappa@stateless.net>
This commit is contained in:
Michael Zappa
2021-12-24 21:20:05 -07:00
parent cc32993e9e
commit 5d073d690c
21 changed files with 42 additions and 715 deletions

View File

@ -27,7 +27,6 @@ import (
"path/filepath"
"strings"
"github.com/j-keck/arping"
"github.com/vishvananda/netlink"
"golang.org/x/sys/unix"
@ -315,11 +314,6 @@ func cmdAdd(args *skel.CmdArgs) error {
return err
}
result, err := current.NewResultFromResult(tuningConf.PrevResult)
if err != nil {
return err
}
// The directory /proc/sys/net is per network namespace. Enter in the
// network namespace before writing on it.
@ -355,12 +349,6 @@ func cmdAdd(args *skel.CmdArgs) error {
return err
}
for _, ipc := range result.IPs {
if ipc.Address.IP.To4() != nil {
_ = arping.GratuitousArpOverIfaceByName(ipc.Address.IP, args.IfName)
}
}
updateResultsMacAddr(tuningConf, args.IfName, tuningConf.Mac)
}