[ulogd2] Source and destination addresses were put in ptr field of the target structure instead of being put in the new type ui128. The result was an improper value of the IPv6 source add destination addresses.

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Mon Jun 2 02:15:00 CEST 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ulogd2.git;a=commit;h=bffb313f5bddf51c086d3250b2b2359c4fe4892e
commit bffb313f5bddf51c086d3250b2b2359c4fe4892e
Author:     Eric Leblond <eric at inl.fr>
AuthorDate: Mon Jun 2 02:02:09 2008 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Mon Jun 2 02:02:09 2008 +0200

    Source and destination addresses were put in ptr field of the target structure
    instead of being put in the new type ui128. The result was an improper value
    of the IPv6 source add destination addresses.
       via  bffb313f5bddf51c086d3250b2b2359c4fe4892e (commit)
      from  befdab96b2040fc2bf65d5837378b8ceb33c1b2a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bffb313f5bddf51c086d3250b2b2359c4fe4892e
Author: Eric Leblond <eric at inl.fr>
Date:   Mon Jun 2 02:02:09 2008 +0200

    Source and destination addresses were put in ptr field of the target structure
    instead of being put in the new type ui128. The result was an improper value
    of the IPv6 source add destination addresses.

-----------------------------------------------------------------------

 filter/raw2packet/ulogd_raw2packet_BASE.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
instead of being put in the new type ui128. The result was an improper value
of the IPv6 source add destination addresses.

diff --git a/filter/raw2packet/ulogd_raw2packet_BASE.c b/filter/raw2packet/ulogd_raw2packet_BASE.c
index b1f4113..a5312e4 100644
--- a/filter/raw2packet/ulogd_raw2packet_BASE.c
+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
@@ -769,9 +769,11 @@ static int _interp_ipv6hdr(struct ulogd_pluginstance *pi, u_int32_t len)
 	if (len < sizeof(struct ip6_hdr))
 		return 0;
 
-	ret[KEY_IP_SADDR].u.value.ptr = &ipv6h->ip6_src;
+	memcpy(ret[KEY_IP_SADDR].u.value.ui128, &ipv6h->ip6_src,
+	       sizeof(ipv6h->ip6_src));
 	ret[KEY_IP_SADDR].flags |= ULOGD_RETF_VALID;
-	ret[KEY_IP_DADDR].u.value.ptr = &ipv6h->ip6_dst;
+	memcpy(ret[KEY_IP_DADDR].u.value.ui128, &ipv6h->ip6_dst,
+	       sizeof(ipv6h->ip6_dst));
 	ret[KEY_IP_DADDR].flags |= ULOGD_RETF_VALID;
 	ret[KEY_IP6_PAYLOAD_LEN].u.value.ui16 = ntohs(ipv6h->ip6_plen);
 	ret[KEY_IP6_PAYLOAD_LEN].flags |= ULOGD_RETF_VALID;



More information about the netfilter-cvslog mailing list