mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 03:46:02 +08:00
fix parsing postup/postdown
This commit is contained in:
parent
997ec430ce
commit
ed7e263fb1
2 changed files with 2 additions and 2 deletions
|
@ -317,7 +317,7 @@ func firewallNFTCommandsCreateEgress(networkInterface string, gatewayInterface s
|
||||||
postUp += "nft add chain nat POSTROUTING ; "
|
postUp += "nft add chain nat POSTROUTING ; "
|
||||||
postUp += "nft add rule ip nat POSTROUTING oifname " + gatewayInterface + " counter masquerade ; "
|
postUp += "nft add rule ip nat POSTROUTING oifname " + gatewayInterface + " counter masquerade ; "
|
||||||
|
|
||||||
postDown += "nft flush table nat; "
|
postDown += "nft flush table nat ; "
|
||||||
}
|
}
|
||||||
|
|
||||||
return postUp, postDown
|
return postUp, postDown
|
||||||
|
|
|
@ -474,7 +474,7 @@ func UpdateWgInterface(file, privateKey, nameserver string, node models.Node) er
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if node.PostDown != "" {
|
if node.PostDown != "" {
|
||||||
parts := strings.Split(node.PostDown, ";")
|
parts := strings.Split(node.PostDown, " ; ")
|
||||||
for i, part := range parts {
|
for i, part := range parts {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
wireguard.Section(section_interface).Key("PostDown").SetValue(part)
|
wireguard.Section(section_interface).Key("PostDown").SetValue(part)
|
||||||
|
|
Loading…
Add table
Reference in a new issue