Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    System / Packages and you. (me)

    Scheduled Pinned Locked Moved pfSense Packages
    6 Posts 3 Posters 433 Views 3 Watching
    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.
    • TacyonT
      Tacyon
      last edited by Tacyon

      I wanted to have the IP lease page (table) to be by default sorted by the IP addresses.
      After a brief bit-o-research I discovered that I could edit the file /usr/local/www/status_dhcp_leases.php and at line 134 or there about change the following:

      if ($_REQUEST['order']) {
      	usort($leases['lease'], function($a, $b) {
      		return strcmp($a[$_REQUEST['order']], $b[$_REQUEST['order']]);
      	});
      }
      

      to read as

      if (!isset($_REQUEST['order'])) {
      	usort($leases['lease'], function($a, $b) {
      		return (ip2long($a['ip']) <=> ip2long($b['ip']));
      	});
      } else {
      	usort($leases['lease'], function($a, $b) {
      		return strcmp($a[$_REQUEST['order']], $b[$_REQUEST['order']]);
      	});
      }
      

      I then figured (assumed that) any update version of the software, (currently 2.9.0-RELEASE) would overwrite my changes which might become annoying.
      After bit-o-more research, I discovered System / Patches.

      And there my assumptions ceased.
      So Questions I have.

      1. Are the currently listed patches with "Apply" buttons vs Revert buttons represent the updates, changes, etc to the main software since the 2.9.0 version release?
      2. (see pic) are all those safe to apply in all cases?
      3. Is -> Custom System Patches for creating my own patches ex: my above mod?
      4. does my code look legit. It does work as intended so I'm "assuming" so.

      b0b05d9e-f2ea-4ac6-909c-37bf48e08789-image.png

      SteveITSS 1 Reply Last reply
      Reply Quote 0
      • SteveITSS
        SteveITS Galactic Empire @Tacyon
        last edited by

        @Tacyon

        1. Yes. Often security or bug fixes released in a later version like 26.07
        2. Yes
        3. Yes, or often to paste in not yet released patches from Netgate devs on the forum or Redmine
        4. Quick look, yes

        Keep in mind the underlying file may change between versions.

        Use the View button to see the patch format.

        To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
        Only install packages for your version of pfSense.
        Upvote 👍 helpful posts!

        TacyonT 1 Reply Last reply
        Reply Quote 0
        • TacyonT
          Tacyon @SteveITS
          last edited by

          @SteveITS
          Thank you, this is reassuring.

          Would it be advised that since this is a small trivial change to code to affecting sort order, and given that "the underlying file may change between versions." that this edit be done manually (by a human, me) to assure that the wrong area doesn't get changed?

          I ask this as I don't know (yet) how patches work and how flexible and intelligent they can be.

          SteveITSS 1 Reply Last reply
          Reply Quote 0
          • SteveITSS
            SteveITS Galactic Empire @Tacyon
            last edited by

            @Tacyon It's up to you. A patch will not apply if the diff doesn't match the file...see the Test and Debug buttons.

            Normally Netgate-released patches here will be included in the next version of pfSense, and the patch is no longer listed.

            To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
            Only install packages for your version of pfSense.
            Upvote 👍 helpful posts!

            TacyonT 1 Reply Last reply
            Reply Quote 0
            • TacyonT
              Tacyon @SteveITS
              last edited by

              @SteveITS
              understood and thanks again for your input.

              1 Reply Last reply
              Reply Quote 0
              • tinfoilmattT
                tinfoilmatt LAYER 8
                last edited by

                Relevant portion of the documentation I've found helpful many times on this topic: https://docs.netgate.com/pfsense/en/latest/development/system-patches.html

                block out log on { ix0 } inet from any to any
                block out log on { ix0 } inet6 from any to any

                1 Reply Last reply
                Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                Privacy Policy · Cookie Policy