Revision 1ff9c7c3
Added by Viktor Gurov over 3 years ago
src/etc/inc/openvpn.inc | ||
---|---|---|
1611 | 1611 |
syslog(LOG_ERR, "OpenVPN failed to start"); |
1612 | 1612 |
} |
1613 | 1613 |
if (!platform_booting()) { |
1614 |
if (isset($settings['unbound_restart'])) { |
|
1615 |
services_unbound_configure(false); |
|
1616 |
} |
|
1614 | 1617 |
send_event("filter reload"); |
1615 | 1618 |
} |
1616 | 1619 |
unlock($lockhandle); |
... | ... | |
1650 | 1653 |
unlink_if_exists("{$g['openvpn_base']}/{$mode_id}/*/*"); |
1651 | 1654 |
unlink_if_exists("{$g['openvpn_base']}/{$mode_id}/*"); |
1652 | 1655 |
openvpn_clean_rules($mode, $vpnid); |
1656 |
services_unbound_configure(false); |
|
1653 | 1657 |
} |
1654 | 1658 |
|
1655 | 1659 |
function openvpn_resync_csc(& $settings) { |
... | ... | |
1735 | 1739 |
} |
1736 | 1740 |
} |
1737 | 1741 |
} |
1742 |
if (isset($settings['unbound_restart'])) { |
|
1743 |
services_unbound_configure(false); |
|
1744 |
} |
|
1738 | 1745 |
} |
1739 | 1746 |
|
1740 | 1747 |
function openvpn_resync_csc_all() { |
... | ... | |
1769 | 1776 |
} |
1770 | 1777 |
} |
1771 | 1778 |
} |
1779 |
services_unbound_configure(false); |
|
1772 | 1780 |
} |
1773 | 1781 |
|
1774 | 1782 |
// Resync the configuration and restart the VPN |
src/usr/local/www/vpn_openvpn_client.php | ||
---|---|---|
626 | 626 |
$client['ping_action_seconds'] = $pconfig['ping_action_seconds']; |
627 | 627 |
$client['inactive_seconds'] = $pconfig['inactive_seconds']; |
628 | 628 |
|
629 |
if (($act == 'new') || ($client['disable'] ^ $a_client[$id]['disable']) || |
|
630 |
($client['tunnel_network'] != $a_client[$id]['tunnel_network']) || |
|
631 |
($client['tunnel_networkv6'] != $a_client[$id]['tunnel_networkv6']) || |
|
632 |
($client['remote_network'] != $a_client[$id]['remote_network']) || |
|
633 |
($client['remote_networkv6'] != $a_client[$id]['remote_networkv6'])) { |
|
634 |
$client['unbound_restart'] = true; |
|
635 |
} |
|
636 |
|
|
629 | 637 |
if (isset($id) && $a_client[$id]) { |
630 | 638 |
$a_client[$id] = $client; |
631 | 639 |
$wc_msg = sprintf(gettext('Updated OpenVPN client to server %1$s:%2$s %3$s'), $client['server_addr'], $client['server_port'], $client['description']); |
src/usr/local/www/vpn_openvpn_csc.php | ||
---|---|---|
308 | 308 |
} |
309 | 309 |
} |
310 | 310 |
|
311 |
if (($act == 'new') || ($csc['disable'] ^ $a_csc[$id]['disable']) || |
|
312 |
($csc['tunnel_network'] != $a_csc[$id]['tunnel_network']) || |
|
313 |
($csc['tunnel_networkv6'] != $a_csc[$id]['tunnel_networkv6']) || |
|
314 |
($csc['local_network'] != $a_csc[$id]['local_network']) || |
|
315 |
($csc['local_networkv6'] != $a_csc[$id]['local_networkv6']) || |
|
316 |
($csc['remote_network'] != $a_csc[$id]['remote_network']) || |
|
317 |
($csc['remote_networkv6'] != $a_csc[$id]['remote_networkv6'])) { |
|
318 |
$csc['unbound_restart'] = true; |
|
319 |
} |
|
320 |
|
|
311 | 321 |
if (isset($id) && $a_csc[$id]) { |
312 | 322 |
$old_csc = $a_csc[$id]; |
313 | 323 |
$a_csc[$id] = $csc; |
src/usr/local/www/vpn_openvpn_server.php | ||
---|---|---|
848 | 848 |
$server['ping_action_push'] = $pconfig['ping_action_push']; |
849 | 849 |
$server['inactive_seconds'] = $pconfig['inactive_seconds']; |
850 | 850 |
|
851 |
if (($act == 'new') || ($server['disable'] ^ $a_server[$id]['disable']) || |
|
852 |
($server['tunnel_network'] != $a_server[$id]['tunnel_network']) || |
|
853 |
($server['tunnel_networkv6'] != $a_server[$id]['tunnel_networkv6']) || |
|
854 |
($server['local_network'] != $a_server[$id]['local_network']) || |
|
855 |
($server['local_networkv6'] != $a_server[$id]['local_networkv6']) || |
|
856 |
($server['remote_network'] != $a_server[$id]['remote_network']) || |
|
857 |
($server['remote_networkv6'] != $a_server[$id]['remote_networkv6'])) { |
|
858 |
$server['unbound_restart'] = true; |
|
859 |
} |
|
860 |
|
|
851 | 861 |
if (isset($id) && $a_server[$id]) { |
852 | 862 |
$a_server[$id] = $server; |
853 | 863 |
$wc_msg = sprintf(gettext('Updated OpenVPN server on %1$s:%2$s %3$s'), convert_friendly_interface_to_friendly_descr($server['interface']), $server['local_port'], $server['description']); |
Also available in: Unified diff
Restart unbound to update ACL on OpenVPN change. Issue #12991