socket-bind: use lowercase "ipv4"/"ipv6" spelling

In most of our codebase when we referenced "ipv4" and "ipv6" on the
right-hand-side of an assignment, we lowercases it (on the
left-hand-side we used CamelCase, and thus "IPv4" and "IPv6"). In
particular all across the networkd codebase the various "per-protocol
booleans" use the lower-case spelling. Hence, let's use lower-case for
SocketBindAllow=/SocketBindDeny= too, just make sure things feel like
they belong together better.

(This work is not included in any released version, hence let's fix this
now, before any fixes in this area would be API breakage)

Follow-up for #17655
This commit is contained in:
Lennart Poettering
2021-05-11 15:37:31 +02:00
parent 5c2e595767
commit f80a206aa4
6 changed files with 17 additions and 17 deletions
+5 -6
View File
@@ -879,14 +879,13 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons
address_family = eq ? word : NULL;
if (address_family) {
if (!STR_IN_SET(address_family, "IPv4", "IPv6"))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Only IPv4 and IPv6 protocols are supported");
if (streq(address_family, "IPv4"))
if (streq(address_family, "ipv4"))
family = AF_INET;
else
else if (streq(address_family, "ipv6"))
family = AF_INET6;
else
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Only \"ipv4\" and \"ipv6\" protocols are supported");
}
user_port = eq ? eq : word;