Merge pull request #19567 from poettering/ipv4-ipv6-lowercase

various follow-ups to socket-bind logic
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-05-12 12:21:58 +02:00
committed by GitHub
10 changed files with 51 additions and 38 deletions
+3 -5
View File
@@ -12,6 +12,7 @@
#include "sd-bus.h"
#include "af-list.h"
#include "alloc-util.h"
#include "bus-container.h"
#include "bus-control.h"
@@ -821,11 +822,8 @@ static int parse_tcp_address(sd_bus *b, const char **p, char **guid) {
return -EINVAL;
if (family) {
if (streq(family, "ipv4"))
hints.ai_family = AF_INET;
else if (streq(family, "ipv6"))
hints.ai_family = AF_INET6;
else
hints.ai_family = af_from_ipv4_ipv6(family);
if (hints.ai_family == AF_UNSPEC)
return -EINVAL;
}