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

6
wg.go
View File

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