Project

General

Profile

« Previous | Next » 

Revision 012e36e6

Added by Marcos M 11 months ago

Additional revisions to OpenVPN CSC. Fix #12522

Fix the keep_minimal checkbox being unchecked on page load, and
move it below the remove_options list. Add more remove options
and clarify remove_route.

View differences:

src/etc/inc/openvpn.inc
1695 1695
			$options = match ($option) {
1696 1696
				'remove_route' => 'route',
1697 1697
				'remove_iroute' => 'iroute',
1698
				'remove_redirect_gateway' => 'redirect-gateway',
1698 1699
				'remove_inactive' => 'inactive',
1699 1700
				'remove_ping' => 'ping',
1700 1701
				'remove_ping_action' => ['ping-restart', 'ping-exit'],
1702
				'remove_blockoutsidedns' => 'block-outside-dns',
1701 1703
				'remove_dnsdomain' => '"dhcp-option DOMAIN"',
1702 1704
				'remove_dnsservers' => '"dhcp-option DNS"',
1703 1705
				'remove_ntpservers' => '"dhcp-option NTP"',
src/usr/local/www/vpn_openvpn_csc.php
80 80

  
81 81
if (($act == "edit") || ($act == "dup")) {
82 82
	if ($this_csc_config) {
83
		$pconfig['keep_minimal'] = $this_csc_config['keep_minimal'];
83
		$pconfig['keep_minimal'] = isset($this_csc_config['keep_minimal']);
84 84
		// Handle the "Reset Options" list
85 85
		if (!empty($this_csc_config['remove_options'])) {
86 86
			$pconfig['override_options'] = 'remove_specified';
......
507 507
		]
508 508
	))->setHelp('Prevent this client from receiving server-defined client settings. Other client-specific options on this page will supersede these options.');
509 509

  
510
	$section->addInput(new Form_Checkbox(
511
		'keep_minimal',
512
		'Keep minimal options',
513
		'Automatically determine the client topology and gateway',
514
		$pconfig['keep_minimal']
515
	))->setHelp('If checked, generate the required client configuration when server options are reset or removed.');
516

  
517 510
	$group = new Form_Group('Remove Options');
518 511
	$group->addClass('remove_options');
519 512
	$group->add(new Form_Select(
......
521 514
		null,
522 515
		$pconfig['remove_options'],
523 516
		[
524
			'remove_route' => 'Local Routes',
517
			'remove_route' => 'Local Routes & Gateways',
525 518
			'remove_iroute' => 'Remote Routes',
519
			'remove_redirect_gateway' => 'Redirect Gateways',
526 520
			'remove_inactive' => 'Inactivity Timeout',
527 521
			'remove_ping' => 'Client Ping',
528 522
			'remove_ping_action' => 'Ping Action',
529 523
			'remove_dnsdomain' => 'DNS Domains',
530 524
			'remove_dnsservers' => 'DNS Servers',
525
			'remove_blockoutsidedns' => 'Block Outside DNS',
531 526
			'remove_ntpservers' => 'NTP Options',
532 527
			'remove_netbios_ntype' => 'NetBIOS Type',
533 528
			'remove_netbios_scope' => 'NetBIOS Scope',
......
537 532
	))->setHelp('A "push-remove" option will be sent to the client for the selected options, removing the respective server-defined option.');
538 533
	$section->add($group);
539 534

  
535
	$section->addInput(new Form_Checkbox(
536
		'keep_minimal',
537
		'Keep minimal options',
538
		'Automatically determine the client topology and gateway',
539
		$pconfig['keep_minimal']
540
	))->setHelp('If checked, generate the required client configuration when server options are reset or removed.');
541

  
540 542
	$form->add($section);
541 543

  
542 544
	$section = new Form_Section('Tunnel Settings');

Also available in: Unified diff