Navigation

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

    Config Settings Long/Short Form Inconsistency

    General pfSense Questions
    3
    6
    465
    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
      • jimp
        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

        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
          • jimp
            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.

            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 Developer Netgate last edited by

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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Products

                • Platform Overview
                • TNSR
                • pfSense
                • Appliances

                Services

                • Training
                • Professional Services

                Support

                • Subscription Plans
                • Contact Support
                • Product Lifecycle
                • Documentation

                News

                • Media Coverage
                • Press
                • Events

                Resources

                • Blog
                • FAQ
                • Find a Partner
                • Resource Library
                • Security Information

                Company

                • About Us
                • Careers
                • Partners
                • Contact Us
                • Legal
                Our Mission

                We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                Subscribe to our Newsletter

                Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                © 2021 Rubicon Communications, LLC | Privacy Policy