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>
Mon, 12 Jul 2021 11:30:53 +0000 (13:30 +0200)
commit6ec5680beaa8df4b4b87e9aa614d29561c0e98fe
treebf5504e0679693c642c228e59425c3bee090b443
parent3648d39d6dbb4d58507bd444b9e35ad5501b5fe3
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)
src/resolve/resolvconf-compat.c
src/resolve/resolvectl.c
src/resolve/resolvectl.h