From da8a112db9f289225a8217e65b2c08b0f410aed9 Mon Sep 17 00:00:00 2001 From: kcr Date: Wed, 4 Mar 2009 03:58:56 +0000 Subject: [PATCH] actually set the address family on incoming addresses git-svn-id: svn://svn.1ts.org/debian/branches/zephyr-reloaded@415 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f --- zephyr/debian/rules | 2 ++ zephyr/lib/ZParseNot.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zephyr/debian/rules b/zephyr/debian/rules index c06f918..b89b655 100755 --- a/zephyr/debian/rules +++ b/zephyr/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/zephyr/lib/ZParseNot.c b/zephyr/lib/ZParseNot.c index c81ae97..f5b90cd 100644 --- a/zephyr/lib/ZParseNot.c +++ b/zephyr/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--; -- 2.45.2