From 551e747c00593755fce3371cbe4c4779b644208d Mon Sep 17 00:00:00 2001 From: oashnic Date: Mon, 4 Nov 2019 23:52:08 +0300 Subject: [PATCH] Add ignore exist address error in SyncAddress() (#3) Fix IPv6 addresses --- wg.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wg.go b/wg.go index 0c2db6d..21a2741 100644 --- a/wg.go +++ b/wg.go @@ -229,8 +229,10 @@ func SyncAddress(cfg *Config, link netlink.Link, log logrus.FieldLogger) error { IPNet: &addr, Label: cfg.AddressLabel, }); err != nil { - log.WithError(err).Error("cannot add addr") - return err + if err != syscall.EEXIST { + log.WithError(err).Error("cannot add addr") + return err + } } log.Info("address added") }