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

@ -43,10 +43,6 @@ func ConfigureIface(ifName string, res *current.Result) error {
return fmt.Errorf("failed to lookup %q: %v", ifName, err)
}
if err := netlink.LinkSetUp(link); err != nil {
return fmt.Errorf("failed to set %q UP: %v", ifName, err)
}
var v4gw, v6gw net.IP
var has_enabled_ipv6 bool = false
for _, ipc := range res.IPs {
@ -99,6 +95,10 @@ func ConfigureIface(ifName string, res *current.Result) error {
}
}
if err := netlink.LinkSetUp(link); err != nil {
return fmt.Errorf("failed to set %q UP: %v", ifName, err)
}
if v6gw != nil {
ip.SettleAddresses(ifName, 10)
}