From 87325cbd43b4e0560fae657125e3df958192fc9f Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Wed, 4 Mar 2009 03:58:56 +0000 Subject: actually set the address family on incoming addresses --- debian/rules | 2 ++ lib/ZParseNot.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index c06f918..b89b655 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,8 @@ export DH_OPTIONS CONFIGURE_ROOT=--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --datadir=/etc --with-ares=/usr --with-hesiod=/usr +CFLAGS=-O -g + # see /usr/share/doc/autotools-dev/README.Debian.gz export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) diff --git a/lib/ZParseNot.c b/lib/ZParseNot.c index c81ae97..f5b90cd 100644 --- a/lib/ZParseNot.c +++ b/lib/ZParseNot.c @@ -260,11 +260,13 @@ ZParseNotice(char *buffer, if (ZReadZcode((unsigned char *)ptr, addrbuf, sizeof(addrbuf), &len) == ZERR_BADFIELD) BAD_PACKET; - if (len == sizeof(notice->z_sender_sockaddr.ip6.sin6_addr)) + if (len == sizeof(notice->z_sender_sockaddr.ip6.sin6_addr)) { + notice->z_sender_sockaddr.ip6.sin6_family = AF_INET6; memcpy(¬ice->z_sender_sockaddr.ip6.sin6_addr, addrbuf, len); - else if (len == sizeof(notice->z_sender_sockaddr.ip4.sin_addr)) + } else if (len == sizeof(notice->z_sender_sockaddr.ip4.sin_addr)) { + notice->z_sender_sockaddr.ip4.sin_family = AF_INET; memcpy(¬ice->z_sender_sockaddr.ip4.sin_addr, addrbuf, len); - else + } else BAD_PACKET; numfields--; -- cgit v1.2.3