Fix IPv6 support.

PR:		ports/160344
Submitted by:	Viktor Gal <wiking@maeth.com>
This commit is contained in:
Alex Dupre 2011-09-05 12:14:19 +00:00
parent 9c07d08fb8
commit 3b0886cfe4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281232
2 changed files with 21 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= mydns
PORTVERSION= 1.1.0
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= dns databases
MASTER_SITES= http://mydns.bboy.net/download/

View file

@ -0,0 +1,20 @@
--- src/mydns/listen.c.orig 2011-09-05 14:11:54.000000000 +0200
+++ src/mydns/listen.c 2011-09-05 14:13:17.000000000 +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
}