diff --git a/src/etc/inc/interfaces.lib.inc b/src/etc/inc/interfaces.lib.inc index b3605fa86..43df7f883 100644 --- a/src/etc/inc/interfaces.lib.inc +++ b/src/etc/inc/interfaces.lib.inc @@ -231,13 +231,12 @@ function configure_interface_hardware($ifs) { global $config; $intf_details = legacy_interface_details($ifs); - /* skip vlans for checksumming and polling */ + /* skip vlans for checksumming */ if (!stristr($ifs, "_vlan") && is_array($intf_details)) { // get current settings $csum_set = in_array('rxcsum', $intf_details['options']) || in_array('txcsum', $intf_details['options']); $tso_set = in_array('tso4', $intf_details['options']) || in_array('tso6', $intf_details['options']); $lro_set = in_array('lro', $intf_details['options']); - $polling_set = in_array('polling', $intf_details['options']); // hardware checksum offloading offloading if (isset($config['system']['disablechecksumoffloading']) && $csum_set) { @@ -258,12 +257,5 @@ function configure_interface_hardware($ifs) } elseif (!isset($config['system']['disablelargereceiveoffloading']) && !$lro_set) { legacy_interface_flags($ifs, 'lro', false); } - - // polling - if (isset($config['system']['polling']) && !$polling_set) { - legacy_interface_flags($ifs, 'polling', false); - } elseif (!isset($config['system']['polling']) && $polling_set) { - legacy_interface_flags($ifs, '-polling', false); - } } } diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 2489ef9bd..0e3af1644 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -71,29 +71,6 @@ function get_dns_servers() { return array_unique($dns_servers); } - -/****f* legacy/setup_polling - * NAME - * sets up polling - * INPUTS - * - * RESULT - * null - * NOTES - * - ******/ -function setup_polling() -{ - global $config; - - if (isset($config['system']['polling'])) { - set_single_sysctl("kern.polling.idle_poll", "1"); - } else { - set_single_sysctl("kern.polling.idle_poll", "0"); - } -} - - /* * get_carp_interface_status($carpinterface): returns the status of a carp ip */ diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 47d119653..c298bdb7e 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1773,19 +1773,18 @@ function system_console_configure() function system_setup_sysctl() { - global $config; activate_sysctls(); - if (isset($config['system']['sharednet'])) { - system_disable_arp_wrong_if(); - } + system_arp_wrong_if(); } -function system_disable_arp_wrong_if() +function system_arp_wrong_if() { - set_sysctl(array( - "net.link.ether.inet.log_arp_wrong_iface" => "0", - "net.link.ether.inet.log_arp_movements" => "0" - )); + global $config; + + set_sysctl(array( + 'net.link.ether.inet.log_arp_wrong_iface' => isset($config['system']['sharednet']) ? '0' : '1', + 'net.link.ether.inet.log_arp_movements' => isset($config['system']['sharednet']) ? '0' : '1', + )); } function get_possible_listen_ips($include_ipv6_link_local=false) { diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 2bbec1b2a..d2f628eda 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -1357,12 +1357,12 @@ function get_alias_list($type = null) return $result; } -/* Define what is preferred, IPv4 or IPv6 */ -function prefer_ipv4_or_ipv6() { +function prefer_ipv4_or_ipv6() +{ global $config; - if (isset($config['system']['prefer_ipv4'])) - mwexec("/etc/rc.d/ip6addrctl prefer_ipv4"); - else - mwexec("/etc/rc.d/ip6addrctl prefer_ipv6"); + mwexecf( + '/etc/rc.d/ip6addrctl %s', + isset($config['system']['prefer_ipv4']) ? 'prefer_ipv4' : 'prefer_ipv6' + ); } diff --git a/src/etc/rc.bootup b/src/etc/rc.bootup index fcc539a2c..d895aeb9e 100755 --- a/src/etc/rc.bootup +++ b/src/etc/rc.bootup @@ -228,11 +228,6 @@ echo "Starting Secure Shell Services..."; mwexec("/usr/local/etc/rc.sshd"); echo "done.\n"; -/* setup polling */ -echo "Setting up polling defaults..."; -setup_polling(); -echo "done.\n"; - /* set up interfaces */ mute_kernel_msgs(); interfaces_configure(); diff --git a/src/www/system_advanced_network.php b/src/www/system_advanced_network.php index b0e222a5e..8f08e2b29 100644 --- a/src/www/system_advanced_network.php +++ b/src/www/system_advanced_network.php @@ -42,7 +42,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']); $pconfig['ipv6nat_ipaddr'] = isset($config['diag']['ipv6nat']['ipaddr']) ? $config['diag']['ipv6nat']['ipaddr']:"" ; $pconfig['prefer_ipv4'] = isset($config['system']['prefer_ipv4']); - $pconfig['polling'] = isset($config['system']['polling']); $pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']); $pconfig['disablesegmentationoffloading'] = isset($config['system']['disablesegmentationoffloading']); $pconfig['disablelargereceiveoffloading'] = isset($config['system']['disablelargereceiveoffloading']); @@ -86,12 +85,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { unset($config['system']['sharednet']); } - if (!empty($pconfig['polling'])) { - $config['system']['polling'] = true; - } elseif (isset($config['system']['polling'])) { - unset($config['system']['polling']); - } - if (!empty($pconfig['disablechecksumoffloading'])) { $config['system']['disablechecksumoffloading'] = true; } elseif (isset($config['system']['disablechecksumoffloading'])) { @@ -117,18 +110,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } if (count($input_errors) == 0) { - setup_polling(); - if (isset($config['system']['sharednet'])) { - system_disable_arp_wrong_if(); - } else { - // system_enable_arp_wrong_if - set_sysctl(array( - "net.link.ether.inet.log_arp_wrong_iface" => "1", - "net.link.ether.inet.log_arp_movements" => "1" - )); - } - write_config(); + system_arp_wrong_if(); prefer_ipv4_or_ipv6(); filter_configure(); header("Location: system_advanced_network.php"); @@ -189,8 +172,8 @@ include("head.inc");