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

    DNS Resolver - TXT Comment Support Option

    2.3-RC Snapshot Feedback and Issues - ARCHIVED
    4
    7
    2.7k
    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

      The DNS Resolver txt comment support option doesn't seem to work.

      Create TXT records
      Any descriptions associated with Host entries and DHCP Static mappings will create a corresponding TXT record.

      Can't seem to get a txt record out of it.

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        The checkbox sets the tag "txtsupport" in the config fine. So the GUI code in 2.3 is working OK, like it did in 2.2.* also.
        But in both 2.2.5 and 2.3 Ican't find any back-end code that use "txtsupport". So this seems to be "the checkbox you have when you're not having a checkbox" - fun to click, but does nothing.
        I wonder if anyone ever raised an issue about this previously?

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          @phil.davis:

          I wonder if anyone ever raised an issue about this previously?

          I can't see a redmine issue, so I raised one: https://redmine.pfsense.org/issues/5545

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by

            The back end code is there in the Unbound package, but didn't get carried over when it was built-in for some reason. Pull requests welcome if someone wants to port it over. Otherwise I might just remove the front-end option as a quick fix since it's probably not all that useful of a feature and there are a lot of other things to do.

            1 Reply Last reply Reply Quote 0
            • D
              doktornotor Banned
              last edited by

              I'll look into sticking the code back from the former package, looks trivial enough.

              Errr… You know what? Just nuke it. The way it's being done now involves way too many levels of indirection and is a damned mess - that's probably being that "some reason" why it didn't get carried over.

              If someone still cares - you'd need to:

              • patch system_hosts_generate() function in /etc/inc/system.inc (https://github.com/pfsense/pfsense/blob/master/src/etc/inc/system.inc#L385) to add the DHCP static mapping descriptions to /var/etc/hosts as a trailing comment for each line (taking care it does not fsck up anything else parsing that file)
              • patch the already messy read_hosts() function in /etc/inc/unbound.inc (https://github.com/pfsense/pfsense/blob/master/src/etc/inc/unbound.inc#L415) to pick up that description
              • patch unbound_add_host_entries() function in /etc/inc/unbound.inc () to add the TXT records to /var/unbound/host_entries.conf file as it was being done in the 2.1.x unbound package (https://github.com/pfsense/pfsense-packages/blob/master/config/unbound/unbound.inc#L882)

              Don't feel like wasting time with this. The old unbound package was picking this up straight from config.xml without additional two levels of indirection, so yeah that was indeed trivial enough. Not now.  >:(

              1 Reply Last reply Reply Quote 0
              • C
                cmb
                last edited by

                @doktornotor:

                I'll look into sticking the code back from the former package, looks trivial enough.

                Errr… You know what? Just nuke it. The way it's being done now involves way too many levels of indirection and is a damned mess

                So you went through the exact same process as me. :) "Hm, that looks easy" …to... "sheesh, wtf, screw this."

                I just removed it from the front end.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by

                  @cmb:

                  So you went through the exact same process as me. :) "Hm, that looks easy" …to... "sheesh, wtf, screw this."

                  I just removed it from the front end.

                  Well yes… and - frankly, the entire code would benefit from complete rewrite. WTH was it done like this? (Not to mention, the config variable naming which made me waste about half an hour wondering where's actually the unbound part of the code that parses the DHCP configuration.)

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