From: sthen Date: Thu, 1 Jun 2017 20:18:44 +0000 (+0000) Subject: Revert 1.16 ("add a workaround for the rebound portjacking hijinks"), X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=27ef809be89bf4354a2b00ea736dfc3c163f8713;p=openbsd Revert 1.16 ("add a workaround for the rebound portjacking hijinks"), it breaks at least nslookup, host, dig +tcp. --- diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c index 4c8ff67b2f0..dcdb1deb8b0 100644 --- a/usr.sbin/bind/bin/dig/dighost.c +++ b/usr.sbin/bind/bin/dig/dighost.c @@ -34,8 +34,6 @@ #include #include -#include - #ifdef HAVE_LOCALE_H #include #endif @@ -2780,15 +2778,6 @@ recv_done(isc_task_t *task, isc_event_t *event) { isc_region_t r; isc_buffer_t *buf = NULL; #endif - static int checked_jackport; - static int jackport; - - if (!checked_jackport) { - int dnsjacking[2] = { CTL_KERN, KERN_DNSJACKPORT }; - size_t portlen = sizeof(jackport); - sysctl(dnsjacking, 2, &jackport, &portlen, NULL, 0); - checked_jackport = 1; - } UNUSED(task); INSIST(!free_now); @@ -2865,7 +2854,6 @@ recv_done(isc_task_t *task, isc_event_t *event) { * sent to 0.0.0.0, :: or to a multicast addresses. * XXXMPA broadcast needs to be handled here as well. */ - if (jackport == 0) if ((!isc_sockaddr_eqaddr(&query->sockaddr, &any) && !isc_sockaddr_ismulticast(&query->sockaddr)) || isc_sockaddr_getport(&query->sockaddr) !=