mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 17:29:15 +08:00
excluding netmaker from set peers
This commit is contained in:
@@ -257,7 +257,6 @@ func InitWireguard(node *nodepb.Node, privkey string, peers []wgtypes.PeerConfig
|
||||
}
|
||||
}
|
||||
//=========DNS Setup==========\\
|
||||
log.Println("NODECFG.DNS:", nodecfg.DNS)
|
||||
if nodecfg.DNS == "on" {
|
||||
_ = local.UpdateDNS(ifacename, network, nameserver)
|
||||
}
|
||||
@@ -300,8 +299,6 @@ func InitWireguard(node *nodepb.Node, privkey string, peers []wgtypes.PeerConfig
|
||||
if hasGateway {
|
||||
spew.Dump(gateways)
|
||||
for _, gateway := range gateways {
|
||||
log.Println("Gateway:")
|
||||
spew.Dump(gateway)
|
||||
out, err := exec.Command(ipExec, "-4", "route", "add", gateway, "dev", ifacename).Output()
|
||||
fmt.Println(string(out))
|
||||
if err != nil {
|
||||
@@ -409,7 +406,7 @@ func SetWGConfig(network string, peerupdate bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if peerupdate {
|
||||
if peerupdate && node.Name != "netmaker" {
|
||||
SetPeers(node.Interface, peers)
|
||||
} else {
|
||||
err = InitWireguard(&node, privkey, peers, hasGateway, gateways)
|
||||
|
Reference in New Issue
Block a user