From 9dcd10c851e704d70c41c6f9b2f682323a0769b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 23 Oct 2015 00:52:09 +0000 Subject: [PATCH] Switch to using SOCK_DNS flag, rather than the dnssocket() and dnssonnect() calls. Be a bit careful crossing over this, need a kernel no older than Monday. ok guenther tedu semarie --- lib/libc/asr/res_send_async.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index e6c57f42899..50246a12630 100644 --- a/lib/libc/asr/res_send_async.c +++ b/lib/libc/asr/res_send_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send_async.c,v 1.28 2015/10/18 15:15:00 deraadt Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.29 2015/10/23 00:52:09 deraadt Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -304,10 +304,11 @@ sockaddr_connect(const struct sockaddr *sa, int socktype) { int errno_save, sock; - if ((sock = dnssocket(sa->sa_family, socktype | SOCK_NONBLOCK, 0)) == -1) + if ((sock = socket(sa->sa_family, + socktype | SOCK_NONBLOCK | SOCK_DNS, 0)) == -1) goto fail; - if (dnsconnect(sock, sa, sa->sa_len) == -1) { + if (connect(sock, sa, sa->sa_len) == -1) { /* * In the TCP case, the caller will be asked to poll for * POLLOUT so that we start writing the packet in tcp_write() -- 2.20.1