bin/77937: BIND tools fail on hosts without IPv6 and NSes with AAAA

Valentin Nechayev netch at netch.kiev.ua
Tue Feb 22 22:40:17 GMT 2005


>Number:         77937
>Category:       bin
>Synopsis:       BIND tools fail on hosts without IPv6 and NSes with AAAA
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 22 22:40:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Segmentation Fault
>Release:        FreeBSD 4.9-RELEASE-p12 i386
>Organization:
private
>Environment:
FreeBSD 4.9-RELEASE-p12
FreeBSD 4.11-RELEASE

>Description:

When quering something from NSes with AAAA (e.g. ns.ripe.net) on host without
IPv6 in kernel, dig, host, nslookup fail to fall back to IPv4.

>How-To-Repeat:

Screenshot of failure:

$ dig @ns.ripe.net -x 193 ns

; <<>> DiG 8.3 <<>> @ns.ripe.net -x ns 
; (2 servers found)
;; res options: init recurs defnam dnsrch
;; res_nsend: Protocol not supported


>Fix:

Patch follows.

--- contrib/bind/lib/resolv/res_send.c.0	Tue Jan 25 12:42:56 2005
+++ contrib/bind/lib/resolv/res_send.c	Wed Feb 23 00:19:22 2005
@@ -765,7 +765,7 @@
 		if (EXT(statp).nssocks[ns] < 0) {
 			*terrno = errno;
 			Perror(statp, stderr, "socket(dg)", errno);
-			return (-1);
+			return (*terrno == EPROTONOSUPPORT ? 0 : -1);
 		}
 #ifndef CANNOT_CONNECT_DGRAM
 		/*
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list