resolvectl: Only strip ifname suffixes when being resolvconf
authorMike Crowe <mac@mcrowe.com>
Thu, 24 Jun 2021 14:25:58 +0000 (15:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Jul 2021 15:59:39 +0000 (17:59 +0200)
commit0d18f706a3816464053003b706bb6b2c27de12d1
tree39eb2a9e3de9de2e2961fe789c0d5dd8c93f2f69
parent7ebb0f11eaae93cbf54af40d66a6cab36ba29d72
resolvectl: Only strip ifname suffixes when being resolvconf

Only treat interface names containing dots specially when resolvectl is
pretending to be resolvconf to fix
https://github.com/systemd/systemd/issues/20014 .

Move the special suffix-stripping behaviour of ifname_mangle out to the
new ifname_resolvconf_mangle to be called from resolvconf only.

(cherry picked from commit 7875170f01991a1d28cfe284cc7075630cd69055)
(cherry picked from commit 6ec5680beaa8df4b4b87e9aa614d29561c0e98fe)
src/resolve/resolvconf-compat.c
src/resolve/resolvectl.c
src/resolve/resolvectl.h