Bug #14115
closed
DHCP Server page does not properly select a default interface tab if neither WAN nor LAN are capable of being DHCP servers
Added by Christian McDonald over 1 year ago.
Updated over 1 year ago.
Plus Target Version:
23.05
Description
When both WAN and LAN are set to DHCP, the DHCP server web interface doesn't appropriately select an interface tab.
This results in a weird state where the web interface is pointing to a null interface definition.
Files
- Category changed from Web Interface to DHCP (IPv4)
- Target version set to 2.7.0
- Plus Target Version set to 23.05
- Subject changed from Unable to DHCP on OPT interfaces if WAN and LAN are DHCP to Unable to configure DHCP on OPT interfaces if WAN and LAN are DHCP
this state occurs with previous versions too.
click on the tab of opt interface and you will be able to configure the DHCP server .
Looks like one test is reversed when it's trying to locate the starting interface. I don't have a setup to test this handy, but this should work:
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index 7dc327a129..a1a34e70c8 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -80,7 +80,7 @@ if (!$if || !isset($iflist[$if])) {
/* Not static IPv4 or subnet >= 31 */
if (!is_ipaddrv4(config_get_path("interfaces/{$ifent}/ipaddr")) ||
empty($oc['subnet']) ||
- ((int) config_get_path("interfaces/{$ifent}/subnet", 0) < 31)) {
+ ((int) config_get_path("interfaces/{$ifent}/subnet", 0) >= 31)) {
continue;
}
- Assignee changed from Christian McDonald to Jim Pingle
- Status changed from New to Feedback
- % Done changed from 0 to 100
tested on:
Version 23.01-RELEASE (amd64)
built on Fri Feb 10 20:06:33 UTC 2023
FreeBSD 14.0-CURRENT
patch fixes the issue
- Status changed from Feedback to Resolved
- Subject changed from Unable to configure DHCP on OPT interfaces if WAN and LAN are DHCP to DHCP Server page does not properly select a default interface tab if neither WAN nor LAN are capable of being DHCP servers
Updating subject for release notes.
Also available in: Atom
PDF