Skip to content

Commit

Permalink
Add ignore exist address error in SyncAddress() (#3)
Browse files Browse the repository at this point in the history
Fix IPv6 addresses
  • Loading branch information
oashnic authored and nmiculinic committed Nov 4, 2019
1 parent 77aa012 commit 551e747
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 551e747

Please sign in to comment.