mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Remove obsolete OLSRD code. Implements #9117
(cherry picked from commit 592bec817f)
This commit is contained in:
parent
f8ce2bd498
commit
89a746a94d
@ -479,19 +479,6 @@ function services_dhcpdv4_configure() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
if (!function_exists('is_package_installed')) {
|
||||
require_once('pkg-utils.inc');
|
||||
}
|
||||
if (is_package_installed('olsrd') && isset($config['installedpackages']['olsrd'])) {
|
||||
foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) {
|
||||
if (isset($olsrd['enable']) && $olsrd['enable'] == "on") {
|
||||
$is_olsr_enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$syscfg = $config['system'];
|
||||
if (!is_array($config['dhcpd'])) {
|
||||
$config['dhcpd'] = array();
|
||||
@ -672,12 +659,6 @@ EOPP;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($is_olsr_enabled == true) {
|
||||
if ($dhcpifconf['netmask']) {
|
||||
$subnetmask = gen_subnet_mask($dhcpifconf['netmask']);
|
||||
}
|
||||
}
|
||||
|
||||
$all_pools = array();
|
||||
$all_pools[] = $dhcpifconf;
|
||||
if (is_array($dhcpifconf['pool'])) {
|
||||
@ -1407,12 +1388,6 @@ EOD;
|
||||
// of each subnet here is always /64.
|
||||
$pdlen = 64;
|
||||
|
||||
if ($is_olsr_enabled == true) {
|
||||
if ($dhcpv6ifconf['netmask']) {
|
||||
$subnetmask = gen_subnet_maskv6($dhcpv6ifconf['netmask']);
|
||||
}
|
||||
}
|
||||
|
||||
$dnscfgv6 = "";
|
||||
|
||||
if ($dhcpv6ifconf['domain']) {
|
||||
|
||||
@ -648,18 +648,6 @@ function system_routing_configure($interface = "") {
|
||||
echo "system_routing_configure() being called $mt\n";
|
||||
}
|
||||
|
||||
$dont_add_route = false;
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
if (is_array($config['installedpackages']['olsrd'])) {
|
||||
foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) {
|
||||
if (($olsrd['enabledyngw'] == "on") && ($olsrd['enable'] == "on")) {
|
||||
$dont_add_route = true;
|
||||
log_error(gettext("Not adding default route because OLSR dynamic gateway is enabled."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$gateways_arr = return_gateways_array(false, true);
|
||||
foreach ($gateways_arr as $gateway) {
|
||||
// setup static interface routes for nonlocal gateways
|
||||
@ -674,11 +662,9 @@ function system_routing_configure($interface = "") {
|
||||
}
|
||||
}
|
||||
|
||||
if ($dont_add_route == false) {
|
||||
$gateways_status = return_gateways_status(true);
|
||||
fixup_default_gateway("inet", $gateways_status, $gateways_arr);
|
||||
fixup_default_gateway("inet6", $gateways_status, $gateways_arr);
|
||||
}
|
||||
$gateways_status = return_gateways_status(true);
|
||||
fixup_default_gateway("inet", $gateways_status, $gateways_arr);
|
||||
fixup_default_gateway("inet6", $gateways_status, $gateways_arr);
|
||||
|
||||
system_staticroutes_configure($interface, false);
|
||||
|
||||
@ -938,7 +924,7 @@ function system_syslogd_start($sighup = false) {
|
||||
|
||||
$syslogd_extra = "";
|
||||
if (isset($syslogcfg)) {
|
||||
$separatelogfacilities = array('ntp', 'ntpd', 'ntpdate', 'charon', 'ipsec_starter', 'openvpn', 'poes', 'l2tps', 'relayd', 'hostapd', 'dnsmasq', 'named', 'filterdns', 'unbound', 'dhcpd', 'dhcrelay', 'dhclient', 'dhcp6c', 'dpinger', 'radvd', 'routed', 'olsrd', 'zebra', 'ospfd', 'ospf6d', 'bgpd', 'miniupnpd', 'filterlog');
|
||||
$separatelogfacilities = array('ntp', 'ntpd', 'ntpdate', 'charon', 'ipsec_starter', 'openvpn', 'poes', 'l2tps', 'relayd', 'hostapd', 'dnsmasq', 'named', 'filterdns', 'unbound', 'dhcpd', 'dhcrelay', 'dhclient', 'dhcp6c', 'dpinger', 'radvd', 'routed', 'zebra', 'ospfd', 'ospf6d', 'bgpd', 'miniupnpd', 'filterlog');
|
||||
$syslogconf = "";
|
||||
if ($config['installedpackages']['package']) {
|
||||
foreach ($config['installedpackages']['package'] as $package) {
|
||||
@ -952,7 +938,7 @@ function system_syslogd_start($sighup = false) {
|
||||
}
|
||||
}
|
||||
$facilitylist = implode(',', array_unique($separatelogfacilities));
|
||||
$syslogconf .= "!radvd,routed,olsrd,zebra,ospfd,ospf6d,bgpd,miniupnpd\n";
|
||||
$syslogconf .= "!radvd,routed,zebra,ospfd,ospf6d,bgpd,miniupnpd\n";
|
||||
if (!isset($syslogcfg['disablelocallogging'])) {
|
||||
$syslogconf .= "*.* {$log_directive}{$g['varlog_path']}/routing.log\n";
|
||||
}
|
||||
|
||||
@ -41,17 +41,6 @@ if (!$g['services_dhcp_server_enable']) {
|
||||
}
|
||||
|
||||
$if = $_REQUEST['if'];
|
||||
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
if ($config['installedpackages']['olsrd']) {
|
||||
foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) {
|
||||
if ($olsrd['enable']) {
|
||||
$is_olsr_enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
|
||||
/* set the starting interface */
|
||||
@ -941,15 +930,6 @@ $section->addInput(new Form_StaticText(
|
||||
$rangestr
|
||||
));
|
||||
|
||||
if ($is_olsr_enabled) {
|
||||
$section->addInput(new Form_Select(
|
||||
'netmask',
|
||||
'Subnet mask',
|
||||
$pconfig['netmask'],
|
||||
array_combine(range(32, 1, -1), range(32, 1, -1))
|
||||
));
|
||||
}
|
||||
|
||||
$group = new Form_Group('*Range');
|
||||
|
||||
$group->add(new Form_IpAddress(
|
||||
|
||||
@ -101,17 +101,6 @@ if (!$g['services_dhcp_server_enable']) {
|
||||
}
|
||||
|
||||
$if = $_REQUEST['if'];
|
||||
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
if ($config['installedpackages']['olsrd']) {
|
||||
foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) {
|
||||
if ($olsrd['enable']) {
|
||||
$is_olsr_enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
$iflist = array_merge($iflist, get_configured_pppoe_server_interfaces());
|
||||
|
||||
@ -635,15 +624,6 @@ if (is_ipaddrv6($ifcfgip)) {
|
||||
))->setHelp($trackifname ? 'Prefix Delegation subnet will be appended to the beginning of the defined range':'');
|
||||
}
|
||||
|
||||
if ($is_olsr_enabled) {
|
||||
$section->addInput(new Form_Select(
|
||||
'netmask',
|
||||
'Subnet Mask',
|
||||
$pconfig['netmask'],
|
||||
array_combine(range(128, 1, -1), range(128, 1, -1))
|
||||
));
|
||||
}
|
||||
|
||||
$f1 = new Form_Input(
|
||||
'range_from',
|
||||
null,
|
||||
|
||||
@ -40,16 +40,6 @@ if (!$g['services_dhcp_server_enable']) {
|
||||
|
||||
$if = $_REQUEST['if'];
|
||||
|
||||
/* if OLSRD is enabled, allow WAN to house DHCP. */
|
||||
if ($config['installedpackages']['olsrd']) {
|
||||
foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) {
|
||||
if ($olsrd['enable']) {
|
||||
$is_olsr_enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$_REQUEST['if']) {
|
||||
$info_msg = gettext("The DHCPv6 Server can only be enabled on interfaces configured with static, non unique local IP addresses.") . "<br />" .
|
||||
gettext("Only interfaces configured with a static IP will be shown.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user