chiark / gitweb /
lib/addr.c: Handle `AF_UNIX' sockets in `netaddress_resolve'.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 1 Jun 2020 11:48:20 +0000 (12:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 1 Jun 2020 11:50:57 +0000 (12:50 +0100)
commit6735af5fd1a4ae3978c0c31ac6026f15742c0a90
tree57243e73e5d10c6fb5091a2e88d87e825bec8759
parent81abb3f17f9ffa9eef1945939abef6c26b56e1ec
lib/addr.c: Handle `AF_UNIX' sockets in `netaddress_resolve'.

A `netaddress' is supposed to permit Unix-domain sockets, but this
doesn't actually work in most places because addresses need resolving
before use, and `netaddress_resolve' just delegates to `getaddrinfo',
which doesn't understand Unix-domain sockets at all.

Fix this by synthesizing an appropriate `struct addrinfo *' list if the
address family is `AF_UNIX'.
lib/addr.c