Bug #6139
closedvpn_openvpn_server.php - When saving a server, all CSCs should be resynced
100%
Description
When saving an OpenVPN server, the CSC files should be resynced in full to make sure they reflect the current server options. If the user changes from topology subnet to net30, or vice versa, the CSCs have to be resynced individually or the firewall has to be rebooted, neither of which is ideal.
The sync could be done for only CSC entries for the server, but it seems like that might be a lot of extra unnecessary logic when openvpn_resync_all() will get the job done.
Updated by Chris Buechler over 8 years ago
- Target version changed from 2.3.1 to 2.3.2
Updated by Chris Buechler over 8 years ago
- Status changed from Assigned to Feedback
Saving a server triggers openvpn_resync_all which runs openvpn_resync_csc:
if (is_array($config['openvpn']['openvpn-csc'])) { foreach ($config['openvpn']['openvpn-csc'] as & $settings) { openvpn_resync_csc($settings); } }
but vpn_openvpn_server.php wasn't doing its write_config until after that. Just switched that order
Updated by Chris Buechler over 8 years ago
same order change made on vpn_openvpn_client.php
JimP: can you confirm whether this fixed the issue you were seeing there? Seems fine.
Updated by Jim Pingle over 8 years ago
- % Done changed from 0 to 100
Applied in changeset 1f954318266fc0da7ee41bb532da969ec9da8b95.