diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php index 326a343b42..74a114ace8 100755 --- a/usr/local/www/services_dhcp_relay.php +++ b/usr/local/www/services_dhcp_relay.php @@ -83,6 +83,13 @@ $pconfig['agentoption'] = isset($config['dhcrelay']['agentoption']); $ifcfg = $config['interfaces'][$if]; +/* set the enabled flag which will tell us if DHCP server is enabled + * on any interface. We will use this to disable dhcp-relay since + * the two are not compatible with each other. + */ +$dhcpd_enabled = false; +foreach($config['dhcpd'] as $dhcp) + if($dhcp['enable']) $dhcpd_enabled = true; if ($_POST) { @@ -170,6 +177,15 @@ function enable_change(enable_over) {
+"; + echo ""; + exit; + } +?>