summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-11-30 20:17:47 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-13 16:46:01 +0100
commite99982218b5549894a94cc3c5f6209219d911ba1 (patch)
treed114ec1dc5247e45f919d54229527771a829b526
parent5541ea21691b5b39adc4bd3e1ff1af86a050c71d (diff)
downloadopenvpn-e99982218b5549894a94cc3c5f6209219d911ba1.tar.gz
openvpn-e99982218b5549894a94cc3c5f6209219d911ba1.tar.xz
openvpn-e99982218b5549894a94cc3c5f6209219d911ba1.zip
Remove dnsflags_to_socktype, it is not used anywhere
Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1354303076-13606-1-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/7160 Signed-off-by: David Sommerseth <davids@redhat.com> (cherry picked from commit 740137f6bb7b3565054c3a8e894ceca93f2ff0e4)
-rw-r--r--src/openvpn/socket.c2
-rw-r--r--src/openvpn/socket.h5
2 files changed, 1 insertions, 6 deletions
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 505cf3b..21a4b2b 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -158,7 +158,7 @@ openvpn_getaddrinfo (unsigned int flags,
CLEAR(hints);
hints.ai_family = ai_family;
hints.ai_flags = AI_NUMERICHOST;
- hints.ai_socktype = dnsflags_to_socktype(flags);
+ hints.ai_socktype = SOCK_STREAM;
status = getaddrinfo(hostname, NULL, &hints, res);
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h
index 44f1098..9cb01fa 100644
--- a/src/openvpn/socket.h
+++ b/src/openvpn/socket.h
@@ -478,11 +478,6 @@ bool unix_socket_get_peer_uid_gid (const socket_descriptor_t sd, int *uid, int *
#define GETADDR_UPDATE_MANAGEMENT_STATE (1<<8)
#define GETADDR_RANDOMIZE (1<<9)
-/* [ab]use flags bits to get socktype info downstream */
-/* TODO(jjo): resolve tradeoff between hackiness|args-overhead */
-#define GETADDR_DGRAM (1<<10)
-#define dnsflags_to_socktype(flags) ((flags & GETADDR_DGRAM) ? SOCK_DGRAM : SOCK_STREAM)
-
in_addr_t getaddr (unsigned int flags,
const char *hostname,
int resolve_retry_seconds,