gluon-mesh-vpn-fastd: use delete_all instead of foreach to delete the old peers

This commit is contained in:
Matthias Schiffer 2014-09-15 21:50:43 +02:00 committed by Nils Schneider
parent eb8f6c0d82
commit d51da5ca71
1 changed files with 4 additions and 6 deletions

View File

@ -40,12 +40,10 @@ c:section('fastd', 'peer_group', 'mesh_vpn_backbone',
}
)
c:foreach('fastd', 'peer',
function(peer)
if peer.net == 'mesh_vpn' and peer.group == 'mesh_vpn_backbone' then
c:delete('fastd', peer['.name'])
end
end
c:delete_all('fastd', 'peer',
function(peer)
return peer.net == 'mesh_vpn' and peer.group == 'mesh_vpn_backbone'
end
)
for name, config in pairs(site.fastd_mesh_vpn.backbone.peers) do