Project

General

Profile

Actions

Bug #6139

closed

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

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

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Chris Buechler over 8 years ago

  • Target version changed from 2.3.1 to 2.3.2
Actions #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

Actions #3

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.

Actions #4

Updated by Jim Pingle over 8 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Chris Buechler over 8 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF