Modern DNS setups require using a leading underscore for hostnames in some situations, e.g. _mydomain.example.com. But that is not possible to enter in the YaST DNS Server module: Underscores are generally rejected.
Fix
Allow a leading underscore for host and domain names. Not just anywhere, just as the leading character.
Since the check is in Hostname.rb which belongs to the yast2 package (repo yast-yast2), this is not in the yast2-dns-server package where it might be expected.
Known Limitation
This allows a leading underscore for all components of a FQDN in all circumstances. Users need to have some expertise to know when that is suitable.
The Error Message
The error message quoted in the bug remains the same; we are not changing it, so not all translations will be broken, resulting in purely English error messages for all international users. The message does not contain anything about the leading underscore. But the message should not appear when this is used correctly.
Screenshot
Notice that leading underscores are now allowed, while underscores in other places are not.
Testing
Manual testing with sudo yast2 dns-server after a manual sudo rake install.
coverage: 41.763% (-0.06%) from 41.821%
when pulling 4904e3b84e0d22f648f342ba3f6883b4a5637c8c on huha-hostname-15-5
into 2af3ca0a68720cb2311d295afa1a78612c2bc350 on SLE-15-SP5.
Target Branch
This is the original PR for SLE-15-SP5. See below for the merge PRs to SLE-15-SP6 and master.
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1219920
Problem
Modern DNS setups require using a leading underscore for hostnames in some situations, e.g.
_mydomain.example.com
. But that is not possible to enter in the YaST DNS Server module: Underscores are generally rejected.Fix
Allow a leading underscore for host and domain names. Not just anywhere, just as the leading character.
Since the check is in
Hostname.rb
which belongs to the yast2 package (repo yast-yast2), this is not in theyast2-dns-server
package where it might be expected.Known Limitation
This allows a leading underscore for all components of a FQDN in all circumstances. Users need to have some expertise to know when that is suitable.
The Error Message
The error message quoted in the bug remains the same; we are not changing it, so not all translations will be broken, resulting in purely English error messages for all international users. The message does not contain anything about the leading underscore. But the message should not appear when this is used correctly.
Screenshot
Notice that leading underscores are now allowed, while underscores in other places are not.
Testing
Manual testing with
sudo yast2 dns-server
after a manualsudo rake install
.Reference
Related PRs