mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
core/cgroup: fix IPAddressAllow=/IPAddressDeny= set through DBus
Fixes a regression caused by84ebe6f013
(v250). Fixes #34773. (cherry picked from commit 77bbd9f1bd2b01bcb2a49ed42c6dc06613532bcf) (cherry picked from commit a94b2c39f94e7af82a56c52941cc1c6aeaf2318f) (cherry picked from commit71fca73f70
)
This commit is contained in:
parent
51ed671255
commit
556f0549d3
@ -1951,11 +1951,12 @@ int bus_cgroup_set_property(
|
||||
prefixes = streq(name, "IPAddressAllow") ? &c->ip_address_allow : &c->ip_address_deny;
|
||||
reduced = streq(name, "IPAddressAllow") ? &c->ip_address_allow_reduced : &c->ip_address_deny_reduced;
|
||||
|
||||
fputs(name, f);
|
||||
fputs("=\n", f);
|
||||
|
||||
if (n == 0) {
|
||||
*reduced = true;
|
||||
*prefixes = set_free(*prefixes);
|
||||
fputs(name, f);
|
||||
fputs("=\n", f);
|
||||
} else {
|
||||
*reduced = false;
|
||||
|
||||
@ -1964,7 +1965,7 @@ int bus_cgroup_set_property(
|
||||
return r;
|
||||
|
||||
const struct in_addr_prefix *p;
|
||||
SET_FOREACH(p, new_prefixes)
|
||||
SET_FOREACH(p, *prefixes)
|
||||
fprintf(f, "%s=%s\n", name,
|
||||
IN_ADDR_PREFIX_TO_STRING(p->family, &p->address, p->prefixlen));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user