Add ignore exist address error in SyncAddress() (#3)

Fix IPv6 addresses
This commit is contained in:
oashnic 2019-11-04 23:52:08 +03:00 committed by Neven Miculinic
parent 77aa012d20
commit 551e747c00

2
wg.go
View File

@ -229,9 +229,11 @@ func SyncAddress(cfg *Config, link netlink.Link, log logrus.FieldLogger) error {
IPNet: &addr,
Label: cfg.AddressLabel,
}); err != nil {
if err != syscall.EEXIST {
log.WithError(err).Error("cannot add addr")
return err
}
}
log.Info("address added")
}