resolvectl omits domains when mixing search and route params

Bug #1976133 reported by koljenovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

systemd 245 (245.4-4ubuntu3.16)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

When I execute:
sudo resolvectl domain neth0 ~example.com example.com
I expect:
Link 17 (neth0): ~example.com example.com

As per man:
"domain [LINK [DOMAIN...]] - The domain command expects valid DNS domains, possibly prefixed with "~", and configures a per-interface search or route-only domain."

What I get instead is:
sudo resolvectl domain neth0 ~example.com example.com

/etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
contains search example.com

resolvectl domain neth0
Link 17 (neth0): example.com

And:
sudo resolvectl domain neth0 example.com ~example.com

/etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
contains no search line

resolvectl domain neth0
Link 17 (neth0): ~example.com

koljenovic (koljenovic)
summary: - resolvectl truncates domains when mixing search and route params
+ resolvectl omits domains when mixing search and route params
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.