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

    Config Settings Long/Short Form Inconsistency

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 878 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.
    • N
      NOYB
      last edited by

      Why are config settings inconsistently saved in long form / short form?

      Sometimes when comparing config files some entries will be in long form and other times in short form.

      A few examples from <openvpn-server>section

      Long Form

      
      <ipaddr></ipaddr>
      
      <passtos></passtos>
      
      

      Short Form

      
       <ipaddr><crlref><passtos></passtos></crlref></ipaddr> 
      ```</openvpn-server>
      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I have seen that on occasion but haven't tried tracking it down. It must be something in the way the values are being saved by the XML parser, though it isn't clear what the specific difference is in this case.

        We're looking into it now, though: https://redmine.pfsense.org/issues/6893

        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
        • N
          NOYB
          last edited by

          Thanks Jim.  Hope it gets figured out.  It would make doing diff compares cleaner.

          Note: In the example I gave it was the section that was being changed that ended up with long form empty tags.  IDK maybe that's a clue.

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

            From what we've seen so far, it's a quirk on how PHP interprets the different values of empty(), zero, null, "", and ''. It's looking like we could force everything to use long tags easier than we could fix it to use short tags, but it's not clear yet if it's worth the extra effort either way.

            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
            • N
              NOYB
              last edited by

              I'm not sure that hold with what I observed.  I've not comprehensively tested it out though.

              I don't really care if it's long or short form but having it be consistent would be helpful.

              1 Reply Last reply Reply Quote 0
              • S
                Steve_B Netgate
                last edited by

                Pushed a change to force <tag></tag>rather than <tag>This should make the config file more consistent.</tag>

                Als ik kan

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