gluon-mesh-vpn-fastd: use delete_all instead of foreach to delete the old peers
This commit is contained in:
parent
1803525745
commit
f9cc73187f
@ -39,12 +39,10 @@ c:section('fastd', 'peer_group', 'mesh_vpn_backbone',
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
c:foreach('fastd', 'peer',
|
c:delete_all('fastd', 'peer',
|
||||||
function(peer)
|
function(peer)
|
||||||
if peer.net == 'mesh_vpn' and peer.group == 'mesh_vpn_backbone' then
|
return peer.net == 'mesh_vpn' and peer.group == 'mesh_vpn_backbone'
|
||||||
c:delete('fastd', peer['.name'])
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for name, config in pairs(site.fastd_mesh_vpn.backbone.peers) do
|
for name, config in pairs(site.fastd_mesh_vpn.backbone.peers) do
|
||||||
|
Loading…
Reference in New Issue
Block a user