modules: don't assume network addresses are numeric

There is no reason to disallow hostnames.

Fixes #4292
This commit is contained in:
Wim Taymans 2024-09-19 09:38:08 +02:00
parent 86004ba3f1
commit d36171f7df

View file

@ -21,7 +21,7 @@ static inline int pw_net_parse_address(const char *address, uint16_t port,
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV; hints.ai_flags = AI_NUMERICSERV;
res = getaddrinfo(address, port_str, &hints, &result); res = getaddrinfo(address, port_str, &hints, &result);