summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-08-31 15:13:32 +0000
committerErmal Luçi <eri@pfsense.org>2008-08-31 15:13:32 +0000
commitca5722042f8498b7cc5852c0906dd9cdfa8644ff (patch)
treefda19741f7cdebe983cc7191b857b5f6f0e1520b /etc/inc
parent7a701b1efc8b63acb5ad6930bb0d398ac8526ed0 (diff)
downloadpfsense-ca5722042f8498b7cc5852c0906dd9cdfa8644ff.zip
pfsense-ca5722042f8498b7cc5852c0906dd9cdfa8644ff.tar.gz
Fix detection if an interface is part of bridge.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc4
-rw-r--r--etc/inc/services.inc14
2 files changed, 10 insertions, 8 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 0f5308a..be4645e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3430,9 +3430,9 @@ function is_dhcp_server_enabled() {
$dhcpdcfg = $config['dhcpd'];
$dhcpdenable = false;
foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
- if (isset ($dhcpifconf['enable']) && (($dhcpif == "lan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ if (isset ($dhcpifconf['enable']) && (($dhcpif == "lan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!link_int_to_bridge_interface($dhcpif)))))
$dhcpdenable = true;
- if (isset ($dhcpifconf['enable']) && (($dhcpif == "wan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ if (isset ($dhcpifconf['enable']) && (($dhcpif == "wan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!link_int_to_bridge_interface($dhcpif)))))
$dhcpdenable = true;
}
return $dhcpdenable;
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index ac796a8..09ad5dd 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -90,11 +90,11 @@ function services_dhcpd_configure() {
if (isset($dhcpifconf['enable']) &&
(($dhcpif == "lan") ||
(isset($config['interfaces'][$dhcpif]['enable']) &&
- $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ $config['interfaces'][$dhcpif]['if'] && (!link_int_to_bridge_interface($dhcpif)))))
$dhcpdenable = true;
if (isset($dhcpifconf['enable']) &&
(($dhcpif == "wan") || (isset($config['interfaces'][$dhcpif]['enable']) &&
- $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ $config['interfaces'][$dhcpif]['if'] && (!link_int_to_bridge_interface($dhcpif)))))
$dhcpdenable = true;
}
@@ -201,10 +201,11 @@ EOPP;
if (!isset($dhcpifconf['enable']) ||
($ifcfg['ipaddr'] == "dhcp") ||
(($dhcpif != "lan") &&
- (!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge'])))
+ (!isset($ifcfg['enable']) || !$ifcfg['if'] ||
+ link_int_to_bridge_interface($dhcpif))))
continue;
- if($dhcpif == "lan" && $ifcfg['bridge'])
+ if($dhcpif == "lan" && link_int_to_bridge_interface($dhcpif))
log_error("NOTE: DHCP Server on LAN is enabled.");
$subnet = gen_subnet($ifcfg['ipaddr'], $ifcfg['subnet']);
@@ -397,7 +398,7 @@ function services_dhcrelay_configure() {
if (isset($dhcrelayifconf['enable']) &&
(($dhcrelayif == "lan") ||
(isset($config['interfaces'][$dhcrelayif]['enable']) &&
- $config['interfaces'][$dhcrelayif]['if'] && (!$config['interfaces'][$dhcrelayif]['bridge']))))
+ $config['interfaces'][$dhcrelayif]['if'] && (!link_int_to_bridge_interface($dhcrelayif)))))
$dhcrelayenable = true;
}
}
@@ -417,7 +418,8 @@ function services_dhcrelay_configure() {
if (!isset($dhcrelayifconf['enable']) ||
(($dhcrelayif != "lan") &&
- (!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge'])))
+ (!isset($ifcfg['enable']) || !$ifcfg['if'] ||
+ link_int_to_bridge_interface($dhcrelayif))))
continue;
$dhcrelayifs[] = $ifcfg['if'];
OpenPOWER on IntegriCloud