From 121b3be02920fbfc29fbd2d90ed2e4e4a515ef50 Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Thu, 13 Feb 2020 16:55:45 +0000 Subject: While we do have AF_UNIX support, dig doesn't use it. --- usr.bin/dig/lib/isc/netaddr.c | 14 +------------- usr.bin/dig/lib/isc/sockaddr.c | 19 +------------------ 2 files changed, 2 insertions(+), 31 deletions(-) (limited to 'usr.bin/dig/lib') diff --git a/usr.bin/dig/lib/isc/netaddr.c b/usr.bin/dig/lib/isc/netaddr.c index d0042d67929..40be09aa60b 100644 --- a/usr.bin/dig/lib/isc/netaddr.c +++ b/usr.bin/dig/lib/isc/netaddr.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: netaddr.c,v 1.3 2020/02/12 13:05:04 jsg Exp $ */ +/* $Id: netaddr.c,v 1.4 2020/02/13 16:55:44 florian Exp $ */ /*! \file */ @@ -106,14 +106,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { case AF_INET6: type = &netaddr->type.in6; break; - case AF_UNIX: - alen = strlen(netaddr->type.un); - if (alen > isc_buffer_availablelength(target)) - return (ISC_R_NOSPACE); - isc_buffer_putmem(target, - (const unsigned char *)(netaddr->type.un), - alen); - return (ISC_R_SUCCESS); default: return (ISC_R_FAILURE); } @@ -187,10 +179,6 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) { memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16); t->zone = s->type.sin6.sin6_scope_id; break; - case AF_UNIX: - memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un)); - t->zone = 0; - break; default: INSIST(0); } diff --git a/usr.bin/dig/lib/isc/sockaddr.c b/usr.bin/dig/lib/isc/sockaddr.c index fd3b597975a..216b2a36e3d 100644 --- a/usr.bin/dig/lib/isc/sockaddr.c +++ b/usr.bin/dig/lib/isc/sockaddr.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.c,v 1.5 2020/02/13 12:03:51 jsg Exp $ */ +/* $Id: sockaddr.c,v 1.6 2020/02/13 16:55:44 florian Exp $ */ /*! \file */ @@ -117,23 +117,6 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) { case AF_INET6: snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sockaddr->type.sin6.sin6_port)); break; -#ifdef ISC_PLAFORM_HAVESYSUNH - case AF_UNIX: - plen = strlen(sockaddr->type.sunix.sun_path); - if (plen >= isc_buffer_availablelength(target)) - return (ISC_R_NOSPACE); - - isc_buffer_putmem(target, sockaddr->type.sunix.sun_path, plen); - - /* - * Null terminate after used region. - */ - isc_buffer_availableregion(target, &avail); - INSIST(avail.length >= 1); - avail.base[0] = '\0'; - - return (ISC_R_SUCCESS); -#endif default: return (ISC_R_FAILURE); } -- cgit v1.2.3