diff --git a/src/lib/ares__socket.c b/src/lib/ares__socket.c index ee733934..4eee6245 100644 --- a/src/lib/ares__socket.c +++ b/src/lib/ares__socket.c @@ -253,6 +253,11 @@ ares_status_t ares__open_connection(ares_channel_t *channel, struct server_connection *conn; ares__llist_node_t *node; int type = is_tcp ? SOCK_STREAM : SOCK_DGRAM; +#ifdef __OpenBSD__ + if((is_tcp && server->tcp_port == 53) || (!is_tcp && server->udp_port == 53)) { + type |= SOCK_DNS; + } +#endif switch (server->addr.family) { case AF_INET: