Project

General

Profile

Bug #6139

vpn_openvpn_server.php - When saving a server, all CSCs should be resynced

Added by Jim Pingle over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
OpenVPN
Target version:
Start date:
04/13/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:

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.

Associated revisions

Revision 5a9c3449 (diff)
Added by Chris Buechler over 3 years ago

write_config before openvpn_resync here as well. Ticket #6139

Revision d368b298 (diff)
Added by Chris Buechler over 3 years ago

write_config before openvpn_resync here as well. Ticket #6139

Revision 1f954318 (diff)
Added by Jim Pingle over 3 years ago

Make a function to resync all OpenVPN CSCs and use it when saving an OpenVPN server. Fixes #6139

Revision 0eef97aa (diff)
Added by Jim Pingle over 3 years ago

Make a function to resync all OpenVPN CSCs and use it when saving an OpenVPN server. Fixes #6139

History

#1 Updated by Chris Buechler over 3 years ago

  • Target version changed from 2.3.1 to 2.3.2

#2 Updated by Chris Buechler over 3 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

#3 Updated by Chris Buechler over 3 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.

#4 Updated by Jim Pingle over 3 years ago

  • % Done changed from 0 to 100

#5 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

fixed

Also available in: Atom PDF