netlink: implement nla_put_in_addr and nla_put_in6_addr
[deliverable/linux.git] / net / ipv6 / netfilter / nf_conntrack_l3proto_ipv6.c
index b68d0e59c1f8bfec0894caff3f53c86a1dca79e9..78284a6974395b2d601d84fc15655b19e9c8e974 100644 (file)
@@ -290,10 +290,8 @@ ipv6_getorigdst(struct sock *sk, int optval, void __user *user, int *len)
 static int ipv6_tuple_to_nlattr(struct sk_buff *skb,
                                const struct nf_conntrack_tuple *tuple)
 {
-       if (nla_put(skb, CTA_IP_V6_SRC, sizeof(u_int32_t) * 4,
-                   &tuple->src.u3.ip6) ||
-           nla_put(skb, CTA_IP_V6_DST, sizeof(u_int32_t) * 4,
-                   &tuple->dst.u3.ip6))
+       if (nla_put_in6_addr(skb, CTA_IP_V6_SRC, &tuple->src.u3.in6) ||
+           nla_put_in6_addr(skb, CTA_IP_V6_DST, &tuple->dst.u3.in6))
                goto nla_put_failure;
        return 0;
 
This page took 0.027505 seconds and 5 git commands to generate.