mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 21:24:16 +08:00
ensure network add to new extclient for dns update
This commit is contained in:
parent
574583b3b1
commit
e0478b9b54
1 changed files with 3 additions and 3 deletions
|
@ -316,8 +316,8 @@ func PublishExtCLientDNS(client *models.ExtClient) error {
|
|||
func PublishExtClientDNSUpdate(old, new models.ExtClient, network string) error {
|
||||
dns := models.DNSUpdate{
|
||||
Action: models.DNSReplaceName,
|
||||
Name: old.ClientID + "." + old.Network,
|
||||
NewName: new.ClientID + "." + new.Network,
|
||||
Name: old.ClientID + "." + network,
|
||||
NewName: new.ClientID + "." + network,
|
||||
}
|
||||
if err := PublishDNSUpdate(network, dns); err != nil {
|
||||
return err
|
||||
|
@ -329,7 +329,7 @@ func PublishExtClientDNSUpdate(old, new models.ExtClient, network string) error
|
|||
func PublishDeleteExtClientDNS(client *models.ExtClient) error {
|
||||
dns := models.DNSUpdate{
|
||||
Action: models.DNSDeleteByName,
|
||||
Name: client.ClientID,
|
||||
Name: client.ClientID + "." + client.Network,
|
||||
}
|
||||
if err := PublishDNSUpdate(client.Network, dns); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue