diff options
author | exploide <me@exploide.net> | 2022-08-10 17:35:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-08-11 09:59:15 +0200 |
commit | e8d0eb3915ac33cc0d3da87a836cee6e61645227 (patch) | |
tree | 81a9d081b1aef456966c82a4d0613f18b6037045 /src/resolve | |
parent | d784a8d474a7e9c421a7b44530612e91c8764627 (diff) | |
download | systemd-e8d0eb3915ac33cc0d3da87a836cee6e61645227.tar.gz |
resolvctl: only remove protocol after last dot when mangling ifname for resolvconf
ifname_resolvconf_mangle is supposed to remove protocol suffixes like .dhcp
from interface names. But this removed also valid parts of the ifname like
VLAN IDs, e.g. enp2s0u4.72.dhcp -> enp2s0u4 instead of enp2s0u4.72
After this change, everything behind the last dot is removed instead of the first.
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolvectl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index aaa1c497c0..6d08821ecd 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -138,7 +138,7 @@ int ifname_resolvconf_mangle(const char *s) { assert(s); - dot = strchr(s, '.'); + dot = strrchr(s, '.'); if (dot) { _cleanup_free_ char *iface = NULL; |