]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolvconf-compat: first parse provided interface name as is
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Oct 2022 08:18:55 +0000 (17:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 Oct 2022 11:34:10 +0000 (20:34 +0900)
commit7d4e850323b4270979ac55dd0e6893a7c348c7e2
treeaa9eec29e07fa0bc56a14e8b4ab8f55343687652
parent427eeb44f229c8613b0f3d7f06bf4eff6c55a00f
resolvconf-compat: first parse provided interface name as is

Then, try to drop multiple protocol specifiers at the end.

Strictly speaking, this breaks backward compatibility:
if eth0 and eth0.42 exists, then previously,
    echo 'nameserver 192.168.0.1' | resolvconf -a eth0.42
adds the DNS server to eth0 instead of eth0.42, as we unconditionally
dropped the specifier after the last dot, and
    echo 'nameserver 192.168.0.1' | resolvconf -a eth0.42.dhcp
adds the DNS server to eth0.42. However, with this commit, now
the both commands add the DNS server to eth0.42. But, hopefully,
this should be preferable behavior.

Fixes #25032.
src/resolve/resolvectl.c
src/resolve/resolvectl.h