core: allow interface altnames in RestrictNetworkInterfaces=

This patch enables IFNAME_VALID_ALTERNATIVE for checks guarding the
parsing of RestrictNetworkInterfaces=.

The underlying implementation for this option already supports
altnames.
This commit is contained in:
networkException
2023-12-18 15:12:10 +01:00
committed by Lennart Poettering
parent a19e7f3101
commit 4e0db87e4c
4 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -2188,7 +2188,7 @@ int bus_cgroup_set_property(
c->restrict_network_interfaces_is_allow_list = is_allow_list;
STRV_FOREACH(s, l) {
if (!ifname_valid(*s)) {
if (!ifname_valid_full(*s, IFNAME_VALID_ALTERNATIVE)) {
log_full(LOG_WARNING, "Invalid interface name, ignoring: %s", *s);
continue;
}
+1 -1
View File
@@ -6096,7 +6096,7 @@ int config_parse_restrict_network_interfaces(
break;
}
if (!ifname_valid(word)) {
if (!ifname_valid_full(word, IFNAME_VALID_ALTERNATIVE)) {
log_syntax(unit, LOG_WARNING, filename, line, 0, "Invalid interface name, ignoring: %s", word);
continue;
}