Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2011 20:49:39 GMT
From:      Viktor Gal <wiking@maeth.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/160344: MyDNS IPv6 support
Message-ID:  <201108312049.p7VKndoG077641@red.freebsd.org>
Resent-Message-ID: <201108312050.p7VKo6A4069367@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         160344
>Category:       ports
>Synopsis:       MyDNS IPv6 support
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 31 20:50:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Viktor Gal
>Release:        8.2-REL
>Organization:
>Environment:
FreeBSD server 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
If one tries to set up mydns (dns/mydns) port to bind on any IPv6 address it will fail.
>How-To-Repeat:
add a 'listen' line where you specify an IPv6 address to your mydns config file and try to run mydns. it will fail to bind on the given address and port as there's a bug in the original code.
>Fix:
only two lines has to be patched in the ./src/mydns/listen.c file in order to fix this problem, see the attached patch file. running mydns with this patch it smoothly binds and replies to DNS queries via IPv6.

Patch attached with submission follows:

--- ./src/mydns/listen.c.orig	2011-08-31 22:27:28.908761531 +0200
+++ ./src/mydns/listen.c	2011-08-31 22:28:38.969853188 +0200
@@ -310,7 +310,7 @@
 #if HAVE_IPV6
 			case AF_INET6:
 				memcpy(&addr6, &((struct sockaddr_in6 *)&ifr->ifr_addr)->sin6_addr, sizeof(struct in6_addr));
-				addrlist_add(AF_INET, &addr4, port);
+				addrlist_add(AF_INET, &addr6, port);
 				break;
 #endif
 			default:
@@ -454,7 +454,7 @@
 			if (inet_pton(AF_INET6, addr, &addr6) <= 0)
 				Warnx("%s: `%s' %s: %s", addr, desc, _("address"), _("invalid IPv6 address format"));
 			else
-				addrlist_add(AF_INET6, &addr4, port);
+				addrlist_add(AF_INET6, &addr6, port);
 		}
 #endif
 	}


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108312049.p7VKndoG077641>