networkctl: do not ignore -EOPNOTSUPP when reading netlink message

If the kernel does not support alternative interface names, then
sd_netlink_message_read_strv() should just return -ENODATA.
This commit is contained in:
Yu Watanabe 2020-07-20 13:43:38 +09:00
parent ae5b779252
commit 48c5398951
1 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,7 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, b
return r;
r = sd_netlink_message_read_strv(m, IFLA_PROP_LIST, IFLA_ALT_IFNAME, &altnames);
if (r < 0 && !IN_SET(r, -EOPNOTSUPP, -ENODATA))
if (r < 0 && r != -ENODATA)
return r;
if (patterns) {