Skip to content

Add support for preserving DHCP ranges configured from terminal #1448

@cotosso

Description

@cotosso

Brief description

  • The UI is designed to manage only one DHCP range per interface.
  • It is possible to manually add additional DHCP ranges at configuration level (outside the UI).
  • However, when multiple DHCP ranges exist, the UI behaves inconsistently:

Current behavior and issues

  • Card view:
    The card always displays the first DHCP range, which is correct and expected.

  • Edit view:
    The UI loads and edits the last DHCP range found in the configuration file, regardless of naming or logical order.
    Example: if the configuration contains:

    config dhcp 'lan'
    .
    .
    config dhcp 'lan_3'
    .
    .
    config dhcp 'lan_2'
    .
    .
    

(in this order), the edit form will always show and modify dhcp 'lan_2'.

  • Edit behavior:
    The modification is internally consistent (the range shown is the one modified), but it is not the same range displayed in the card view.

  • Other DHCP ranges:
    All other DHCP ranges remain unchanged.

Problem

This creates a UI inconsistency and configuration ambiguity:

  • The user sees one DHCP range in the overview card.
  • The user edits a different DHCP range in the edit form.
  • This can lead to misconfiguration without any visible warning.

Expected behavior / fix proposal

  1. The best fix is to allow managing multiple DHCP ranges natively from the UI

As alternatives we could:

  1. prevent any modifications from UI when multiple DHCP pools are configured

  2. modify the UI so that it consistently operate always on the same DHCP range:

  • Always display the first DHCP range in the card view.
  • Always load and edit the same first DHCP range in the edit view.
  • Never modify additional DHCP ranges that were manually added outside the UI.

But this last option is not optimal cause it could generate problems if there is an overlap between the first DHCP range and other ones (that are not visible).

Version : NethSecurity 8.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    ToDo 🕐

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions