diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-20 13:43:38 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-20 15:24:40 +0900 |
commit | 48c53989513bfa00f7fcd2c2975665bc0f9c606c (patch) | |
tree | 4e5b988ccee28bbe3dbea87a5c17ecc897fe0544 /src/network/networkctl.c | |
parent | ae5b77925237a59f5faa4e008b330383b8690cb2 (diff) | |
download | systemd-48c53989513bfa00f7fcd2c2975665bc0f9c606c.tar.gz |
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.
Diffstat (limited to 'src/network/networkctl.c')
-rw-r--r-- | src/network/networkctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 1427508dcd..48182e61dd 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -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) { |