Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [1.2-RC3] A few small DHCP things

    Scheduled Pinned Locked Moved DHCP and DNS
    1 Posts 1 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wago
      last edited by

      Hey All

      Not sure if this is the right place to report these, but I found a couple small issues with the DHCP server UI when dealing with a DHCP cluster…

      1. Consider the case where you have multiple internal subnets... say LAN and DMZ. In services_dhcp.php, it allows the user to enter any IP address for the failover peer. If you use the LAN failover IP when you configure the DMZ DHCP server, it will accept the value, but fail to configure it properly. Specifically, it will configure both sides as 'secondary'. I believe that this is due to the CARP interface discovery logic, but I could be wrong. It would help if this box asked for the "Failover IP on this subnet", or perhaps even checked the user input to make sure it's on the same subnet.

      2. In diag_dhcp_leases.php, it uses the remove_duplicate() function to de-duplicate DHCP messages. When it de-duplicates the failover peers, it picks the first message in dhcpd.leases for failover peer, instead of the most recent message. This is because the remove_duplicate() function uses php's array_unique() function, which always de-dupes by returning the first match. The remove_duplicate() function should try to consider the timestamp of the dhcpd.leases entry, and return the most recent entry by timestamp.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.