Project

General

Profile

« Previous | Next » 

Revision 298df54d

Added by Viktor Gurov over 4 years ago

Unbound custom TLS port fix. Issue #11051

View differences:

src/etc/inc/globals.inc
70 70
	"disablehelpicon" => false,
71 71
	"disablecrashreporter" => false,
72 72
	"debug" => false,
73
	"latest_config" => "21.1",
73
	"latest_config" => "21.2",
74 74
	"minimum_ram_warning" => "101",
75 75
	"minimum_ram_warning_text" => "128 MB",
76 76
	"wan_interface_name" => "wan",
src/etc/inc/upgrade_config.inc
6344 6344
	}
6345 6345
}
6346 6346

  
6347
function upgrade_211_to_212() {
6348
	global $config;
6349
	if (isset($config['unbound']['sslport'])) {
6350
		$config['unbound']['tlsport'] = $config['unbound']['sslport'];
6351
		unset($config['unbound']['sslport']);
6352
	}
6353
}
6354

  
6347 6355
/*
6348 6356
 * Special function that is called independent of current config version. It's
6349 6357
 * a workaround to have config_upgrade running on older versions after next
src/usr/local/www/services_unbound.php
71 71
$pconfig['python_order'] = $a_unboundcfg['python_order'];
72 72
$pconfig['python_script'] = $a_unboundcfg['python_script'];
73 73
$pconfig['port'] = $a_unboundcfg['port'];
74
$pconfig['sslport'] = $a_unboundcfg['sslport'];
74
$pconfig['tlsport'] = $a_unboundcfg['tlsport'];
75 75
$pconfig['sslcertref'] = $a_unboundcfg['sslcertref'];
76 76
$pconfig['custom_options'] = base64_decode($a_unboundcfg['custom_options']);
77 77

  
......
155 155
	if ($pconfig['port'] && !is_port($pconfig['port'])) {
156 156
		$input_errors[] = gettext("A valid port number must be specified.");
157 157
	}
158
	if ($pconfig['sslport'] && !is_port($pconfig['sslport'])) {
158
	if ($pconfig['tlsport'] && !is_port($pconfig['tlsport'])) {
159 159
		$input_errors[] = gettext("A valid SSL/TLS port number must be specified.");
160 160
	}
161 161

  
......
190 190
		$a_unboundcfg['enable'] = isset($pconfig['enable']);
191 191
		$a_unboundcfg['enablessl'] = isset($pconfig['enablessl']);
192 192
		$a_unboundcfg['port'] = $pconfig['port'];
193
		$a_unboundcfg['sslport'] = $pconfig['sslport'];
193
		$a_unboundcfg['tlsport'] = $pconfig['tlsport'];
194 194
		$a_unboundcfg['sslcertref'] = $pconfig['sslcertref'];
195 195
		$a_unboundcfg['dnssec'] = isset($pconfig['dnssec']);
196 196

  
......
342 342
}
343 343

  
344 344
$section->addInput(new Form_Input(
345
	'sslport',
345
	'tlsport',
346 346
	'SSL/TLS Listen Port',
347 347
	'number',
348
	$pconfig['sslport'],
348
	$pconfig['tlsport'],
349 349
	['placeholder' => '853']
350 350
))->setHelp('The port used for responding to SSL/TLS DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 853.');
351 351

  

Also available in: Unified diff