mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
remove peers from interface addresses
This commit is contained in:
@@ -55,10 +55,6 @@ func WgQuickUpMac(node *models.Node, iface string, confPath string) error {
|
||||
return err
|
||||
}
|
||||
var ips = append(node.AllowedIPs, node.Address, node.Address6)
|
||||
peerIPs := getPeerIPs(realIface)
|
||||
if len(peerIPs) > 0 {
|
||||
ips = append(ips, peerIPs...)
|
||||
}
|
||||
for _, i := range ips {
|
||||
if i != "" {
|
||||
err = addAddress(realIface, i)
|
||||
@@ -74,7 +70,8 @@ func WgQuickUpMac(node *models.Node, iface string, confPath string) error {
|
||||
logger.Log(1, "error turning on interface ", iface)
|
||||
return err
|
||||
}
|
||||
for _, i := range ips {
|
||||
peerIPs := getPeerIPs(realIface)
|
||||
for _, i := range peerIPs {
|
||||
if i != "" {
|
||||
err = addRoute(i, realIface)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user