mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
udev/net: verify ID_NET_XYZ before trying to assign it as an alternative name
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user