This makes it easier to use DNSServer with helpers from in-addr-util.h.
return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL),
"Dispatched address size (%zu) is incompatible with the family (%s).",
s->addr.iov_len, af_to_ipv4_ipv6(s->family));
+ memcpy_safe(&s->in_addr, s->addr.iov_base, s->addr.iov_len);
*ret = TAKE_PTR(s);
#include <sys/uio.h>
+#include "in-addr-util.h"
#include "shared-forward.h"
typedef struct DNSServer {
int ifindex;
char *server_name;
bool accessible;
+ union in_addr_union in_addr;
} DNSServer;
DNSServer* dns_server_free(DNSServer *s);