summaryrefslogtreecommitdiff
path: root/src/udev/net
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-16 11:46:11 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-16 16:37:31 +0900
commite65c6c1baa8ea905f7e5bad3b8486d509775ec6a (patch)
tree48edfaba1aba4692f8e3f2ba31933a65b2a967ab /src/udev/net
parent5668f3a7cfccca704ea8e8bdc84ca7e17a5f101e (diff)
downloadsystemd-e65c6c1baa8ea905f7e5bad3b8486d509775ec6a.tar.gz
udev/net: verify ID_NET_XYZ before trying to assign it as an alternative name
Diffstat (limited to 'src/udev/net')
-rw-r--r--src/udev/net/link-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 4c83eede7a..e5f1220928 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -836,7 +836,7 @@ static int link_apply_alternative_names(Link *link, sd_netlink **rtnl) {
default:
assert_not_reached();
}
- if (!isempty(n)) {
+ if (ifname_valid_full(n, IFNAME_VALID_ALTERNATIVE)) {
r = strv_extend(&altnames, n);
if (r < 0)
return log_oom();