Project

General

Profile

Actions

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 about 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DHCP (IPv4)
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
Affected Architecture:

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

2023-03-15_13-15.png (917 KB) 2023-03-15_13-15.png Christian McDonald, 03/15/2023 12:16 PM
no-click.png (65.1 KB) no-click.png Alhusein Zawi, 03/18/2023 06:28 PM
click.png (65.8 KB) click.png Alhusein Zawi, 03/18/2023 06:28 PM
Actions #1

Updated by Jim Pingle about 1 year ago

  • Category changed from Web Interface to DHCP (IPv4)
  • Target version set to 2.7.0
  • Plus Target Version set to 23.05
Actions #2

Updated by Christian McDonald about 1 year ago

  • 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
Actions #3

Updated by Alhusein Zawi about 1 year ago

this state occurs with previous versions too.

click on the tab of opt interface and you will be able to configure the DHCP server .

Actions #4

Updated by Jim Pingle about 1 year ago

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;
                        }

Actions #5

Updated by Jim Pingle 12 months ago

  • Assignee changed from Christian McDonald to Jim Pingle
Actions #6

Updated by Jim Pingle 12 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #7

Updated by Georgiy Tyutyunnik 12 months ago

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

Actions #8

Updated by Jim Pingle 12 months ago

  • Status changed from Feedback to Resolved
Actions #9

Updated by Jim Pingle 12 months ago

  • 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.

Actions

Also available in: Atom PDF