profile
viewpoint

Ask questionsIP and netmask validation in Network page

Input validation can be improved while creating or editing a network interface.

Steps to reproduce

  • Access Cockpit Network page
  • Click on an existing interface or create a new one
  • Input a IP address and a netmask so that:
    • IP address corresponds to the network address (e.g. IP: 10.0.1.0, netmask: 255.255.255.0) OR
    • IP address corresponds to the broadcast address (e.g. IP: 10.0.1.255, netmask: 255.255.255.0) OR
    • The CIDR network defined by IP address and netmask overlaps an existing CIDR network (e.g. input IP: 10.0.1.1, netmask: 255.255.255.0 but there is an existing interface configured with IP: 10.0.1.9, netmask: 255.255.255.252)

Expected behavior

  • IP address and netmask validation should prevent the interface configuration

Actual behavior

  • The interface updates its configuration with the erroneous input values

Components

nethserver-cockpit

NethServer/dev

Answer questions gsanchietti

Test case 1

  • Try to add a new network interface overlapping IP address
  • The UI must return a validation error

Test case 2

  • Try to add a new network interface setting the IP address to the network or broadcast address
  • The UI must return a validation error

Test case 3

  • Try to add a new network interface with good IP address
  • The UI must save the value
useful!

Related questions

VPN Cockpit UI hot 1
source:https://uonfu.com/
Github User Rank List