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

    Deleting DHCP leases in the GUI

    Scheduled Pinned Locked Moved 1.2.3-PRERELEASE-TESTING snapshots - RETIRED
    17 Posts 6 Posters 14.3k 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.
    • X
      xbipin
      last edited by

      same here

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        As I mentioned in this other thread started by djamp42, I'm working on this and one other DHCP lease-related issue.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          There is a file posted in the thread I linked in the previous message which seems to work for everyone.

          I've also got a patch about 95% done that will clear out existing leases for fixed-address/static definitions, so that we will no longer have warnings about duplicate leases from DHCP in the logs. I'll post that for testing when it's ready, too.

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Attached are the two files I've been working on.

            The first is what enables the individual DHCP lease deletion. I changed it a little from the one in the other thread, I moved the delete button to the end so it doesn't mess up the formatting of the buttons quite so much.

            The second file will cause the DHCP editor to clear out leases automatically that match existing static DHCP mapped MAC addresses. This will stop DHCP from complaining about duplicate leases in the logs.

            Both have been committed to 2.0, but with some testing I think there may be a case for bringing these into 1.2.3.

            diag_dhcp_leases.php.txt
            services_dhcp.php.txt

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • D
              Darkk
              last edited by

              The lastest snapshot now have the ability to delete DHCP leases and it's working great.ย  Although one quirk, I have alot of old leases in the "Show all configured leases" so when I go there and delete the lease it'll go back to the default display which is "Active and Static Leases Only".ย  I then have to click on show all configured leases to continue deleting the old leases.

              Shouldn't the screen I'm working on "stick" until I want to go somewhere else?

              Thanks,
              Darkk

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                @Darkk:

                Shouldn't the screen I'm working on "stick" until I want to go somewhere else?

                My 1.2.3-RC1 test box only has one lease in the file at the moment, so I can't properly test this, but try the attached file. It should (hopefully) retain the view.

                diag_dhcp_leases.php.txt

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  Did anyone ever try this? Did it work?

                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • W
                    wonslung
                    last edited by

                    i installed it back when you posted it and it worked nicely

                    1 Reply Last reply Reply Quote 0
                    • D
                      Darkk
                      last edited by

                      Will the "fix" make it into the next snapshot?

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        Perhaps not the next one, or today, but we'll see.

                        There is still another bug I need to fix, and then I'll have to submit the patches again. RELENG_1_2's code is locked down so only a few people can commit there.

                        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          I checked patches into 2.0 for this and another bug, and submitted them for review to get into RELENG_1_2 (aka 1.2.3-RC)

                          I'll post another update if/when they make it.

                          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • jimpJ
                            jimp Rebel Alliance Developer Netgate
                            last edited by

                            Ok, the patches made it into RELENG_1_2 so they should be in the next 1.2.3-RC snapshot, or the one after.

                            If the builder had already started before the code went in, it may not make it in this run.

                            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

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