DNS Resolver - TXT Comment Support Option
-
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.
-
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? -
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
-
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.
-
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. >:(
-
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.
-
@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.)