]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
Source and destination addresses were put in ptr field of the target structure
authorEric Leblond <eric@inl.fr>
Mon, 2 Jun 2008 00:02:09 +0000 (02:02 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 2 Jun 2008 00:02:09 +0000 (02:02 +0200)
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

index b1f4113a9892cac6a3bee0193b461e0957b027ad..a5312e4e985b815489944dfb9cd8b81a4206e6ab 100644 (file)
@@ -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;