这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/etc/inc/system.inc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ function system_resolvconf_generate($dynupdate = false) {
$resolvconf .= "options edns0\n";
}

if (!empty(config_get_path('system/resolvconf_custom_options'))) {
$resolvconf .= base64_decode(config_get_path('system/resolvconf_custom_options', ""));
}

$dnslock = lock('resolvconf', LOCK_EX);

$fd = fopen("{$g['etc_path']}/resolv.conf", "w");
Expand Down
10 changes: 10 additions & 0 deletions src/usr/local/pfSense/include/www/system_advanced_network.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function getAdvancedNetwork($json = false) {
$pconfig['sharednet'] = config_path_enabled('system', 'sharednet') ? config_get_path('system/sharednet') : null;
$pconfig['disablechecksumoffloading'] = config_path_enabled('system', 'disablechecksumoffloading');
$pconfig['ip_change_kill_states'] = config_path_enabled('system', 'ip_change_kill_states') ? config_get_path('system/ip_change_kill_states') : null;
$pconfig['resolvconf_custom_options'] = base64_decode(config_get_path('system/resolvconf_custom_options', ""));
$pconfig['hnaltqenable'] = config_path_enabled('system', 'hn_altq_enable');
$pconfig['disablechecksumoffloading'] = config_path_enabled('system', 'disablechecksumoffloading');
$pconfig['disablesegmentationoffloading'] = config_path_enabled('system', 'disablesegmentationoffloading');
Expand Down Expand Up @@ -222,6 +223,13 @@ function saveAdvancedNetworking($post, $json = false) {
config_del_path('system/ip_change_kill_states');
}

if (!empty(trim($post['resolvconf_custom_options']))) {
$resolvconf_custom_options_source = str_replace("\r\n", "\n", trim($post['resolvconf_custom_options']));
config_set_path('system/resolvconf_custom_options', base64_encode($resolvconf_custom_options_source));
} else {
config_del_path('system/resolvconf_custom_options');
}

setup_microcode();

// Write out configuration (config.xml)
Expand All @@ -240,6 +248,8 @@ function saveAdvancedNetworking($post, $json = false) {
$retval = 0;
$retval |= filter_configure();

system_resolvconf_generate();

if ($syslogrestart) {
system_syslogd_start();
}
Expand Down
10 changes: 10 additions & 0 deletions src/usr/local/www/system_advanced_network.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,16 @@
))->setHelp('This option resets all states when a WAN IP Address changes instead of only '.
'states associated with the previous IP Address.');

$form->add($section);

$section = new Form_Section('DNS Client Configuration');

$section->addInput(new Form_Textarea(
'resolvconf_custom_options',
'resolv.conf custom options',
$pconfig['resolvconf_custom_options']
))->setHelp('Enter any additional options to add to the /etc/resolv.conf configuration here.');

$form->add($section);
print $form;
?>
Expand Down