There is no struct nfattr anymore, rename functions to 'nlattr'.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
 extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
 extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
 
-#define nfattr_bad_size(tb, max, cta_min)                              \
+#define nlattr_bad_size(tb, max, cta_min)                              \
 ({     int __i, __res = 0;                                             \
        for (__i=1; __i <= max; __i++) {                                        \
                if (!cta_min[__i])                                      \
 
 
        void (*destroy)(struct nf_conn *ct);
 
-       int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct);
+       int (*to_nlattr)(struct sk_buff *skb, const struct nf_conn *ct);
 };
 
 extern struct nf_conntrack_helper *
 
        int (*get_l4proto)(const struct sk_buff *skb, unsigned int nhoff,
                           unsigned int *dataoff, u_int8_t *protonum);
 
-       int (*tuple_to_nfattr)(struct sk_buff *skb,
+       int (*tuple_to_nlattr)(struct sk_buff *skb,
                               const struct nf_conntrack_tuple *t);
 
-       int (*nfattr_to_tuple)(struct nlattr *tb[],
+       int (*nlattr_to_tuple)(struct nlattr *tb[],
                               struct nf_conntrack_tuple *t);
 
 #ifdef CONFIG_SYSCTL
 
                     int pf, unsigned int hooknum);
 
        /* convert protoinfo to nfnetink attributes */
-       int (*to_nfattr)(struct sk_buff *skb, struct nlattr *nla,
+       int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla,
                         const struct nf_conn *ct);
 
        /* convert nfnetlink attributes to protoinfo */
-       int (*from_nfattr)(struct nlattr *tb[], struct nf_conn *ct);
+       int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct);
 
-       int (*tuple_to_nfattr)(struct sk_buff *skb,
+       int (*tuple_to_nlattr)(struct sk_buff *skb,
                               const struct nf_conntrack_tuple *t);
-       int (*nfattr_to_tuple)(struct nlattr *tb[],
+       int (*nlattr_to_tuple)(struct nlattr *tb[],
                               struct nf_conntrack_tuple *t);
 
 #ifdef CONFIG_SYSCTL
 extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
 
 /* Generic netlink helpers */
-extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,
+extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
                                      const struct nf_conntrack_tuple *tuple);
-extern int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[],
+extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
                                      struct nf_conntrack_tuple *t);
 
 /* Log invalid packets */
 
                            enum nf_nat_manip_type maniptype,
                            const struct nf_conn *ct);
 
-       int (*range_to_nfattr)(struct sk_buff *skb,
+       int (*range_to_nlattr)(struct sk_buff *skb,
                               const struct nf_nat_range *range);
 
-       int (*nfattr_to_range)(struct nlattr *tb[],
+       int (*nlattr_to_range)(struct nlattr *tb[],
                               struct nf_nat_range *range);
 };
 
 extern void cleanup_protocols(void);
 extern struct nf_nat_protocol *find_nat_proto(u_int16_t protonum);
 
-extern int nf_nat_port_range_to_nfattr(struct sk_buff *skb,
+extern int nf_nat_port_range_to_nlattr(struct sk_buff *skb,
                                       const struct nf_nat_range *range);
-extern int nf_nat_port_nfattr_to_range(struct nlattr *tb[],
+extern int nf_nat_port_nlattr_to_range(struct nlattr *tb[],
                                       struct nf_nat_range *range);
 
 #endif /*_NF_NAT_PROTO_H*/
 
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netfilter/nfnetlink_conntrack.h>
 
-static int ipv4_tuple_to_nfattr(struct sk_buff *skb,
+static int ipv4_tuple_to_nlattr(struct sk_buff *skb,
                                const struct nf_conntrack_tuple *tuple)
 {
        NLA_PUT(skb, CTA_IP_V4_SRC, sizeof(u_int32_t),
        [CTA_IP_V4_DST] = sizeof(u_int32_t),
 };
 
-static int ipv4_nfattr_to_tuple(struct nlattr *tb[],
+static int ipv4_nlattr_to_tuple(struct nlattr *tb[],
                                struct nf_conntrack_tuple *t)
 {
        if (!tb[CTA_IP_V4_SRC] || !tb[CTA_IP_V4_DST])
                return -EINVAL;
 
-       if (nfattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
+       if (nlattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
                return -EINVAL;
 
        t->src.u3.ip = *(__be32 *)nla_data(tb[CTA_IP_V4_SRC]);
        .print_conntrack = ipv4_print_conntrack,
        .get_l4proto     = ipv4_get_l4proto,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr = ipv4_tuple_to_nfattr,
-       .nfattr_to_tuple = ipv4_nfattr_to_tuple,
+       .tuple_to_nlattr = ipv4_tuple_to_nlattr,
+       .nlattr_to_tuple = ipv4_nlattr_to_tuple,
 #endif
 #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
        .ctl_table_path  = nf_net_ipv4_netfilter_sysctl_path,
 
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netfilter/nfnetlink_conntrack.h>
 
-static int icmp_tuple_to_nfattr(struct sk_buff *skb,
+static int icmp_tuple_to_nlattr(struct sk_buff *skb,
                                const struct nf_conntrack_tuple *t)
 {
        NLA_PUT(skb, CTA_PROTO_ICMP_ID, sizeof(u_int16_t),
        [CTA_PROTO_ICMP_ID]     = sizeof(u_int16_t)
 };
 
-static int icmp_nfattr_to_tuple(struct nlattr *tb[],
+static int icmp_nlattr_to_tuple(struct nlattr *tb[],
                                struct nf_conntrack_tuple *tuple)
 {
        if (!tb[CTA_PROTO_ICMP_TYPE]
            || !tb[CTA_PROTO_ICMP_ID])
                return -EINVAL;
 
-       if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
+       if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
                return -EINVAL;
 
        tuple->dst.u.icmp.type =
        .destroy                = NULL,
        .me                     = NULL,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = icmp_tuple_to_nfattr,
-       .nfattr_to_tuple        = icmp_nfattr_to_tuple,
+       .tuple_to_nlattr        = icmp_tuple_to_nlattr,
+       .nlattr_to_tuple        = icmp_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_header       = &icmp_sysctl_header,
 
 
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
 int
-nf_nat_port_range_to_nfattr(struct sk_buff *skb,
+nf_nat_port_range_to_nlattr(struct sk_buff *skb,
                            const struct nf_nat_range *range)
 {
        NLA_PUT(skb, CTA_PROTONAT_PORT_MIN, sizeof(__be16),
 nla_put_failure:
        return -1;
 }
-EXPORT_SYMBOL_GPL(nf_nat_port_nfattr_to_range);
+EXPORT_SYMBOL_GPL(nf_nat_port_nlattr_to_range);
 
 int
-nf_nat_port_nfattr_to_range(struct nlattr *tb[], struct nf_nat_range *range)
+nf_nat_port_nlattr_to_range(struct nlattr *tb[], struct nf_nat_range *range)
 {
        int ret = 0;
 
 
        return ret;
 }
-EXPORT_SYMBOL_GPL(nf_nat_port_range_to_nfattr);
+EXPORT_SYMBOL_GPL(nf_nat_port_range_to_nlattr);
 #endif
 
 /* Noone using conntrack by the time this called. */
 
        .in_range               = gre_in_range,
        .unique_tuple           = gre_unique_tuple,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .range_to_nfattr        = nf_nat_port_range_to_nfattr,
-       .nfattr_to_range        = nf_nat_port_nfattr_to_range,
+       .range_to_nlattr        = nf_nat_port_range_to_nlattr,
+       .nlattr_to_range        = nf_nat_port_nlattr_to_range,
 #endif
 };
 
 
        .in_range               = icmp_in_range,
        .unique_tuple           = icmp_unique_tuple,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .range_to_nfattr        = nf_nat_port_range_to_nfattr,
-       .nfattr_to_range        = nf_nat_port_nfattr_to_range,
+       .range_to_nlattr        = nf_nat_port_range_to_nlattr,
+       .nlattr_to_range        = nf_nat_port_nlattr_to_range,
 #endif
 };
 
        .in_range               = tcp_in_range,
        .unique_tuple           = tcp_unique_tuple,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .range_to_nfattr        = nf_nat_port_range_to_nfattr,
-       .nfattr_to_range        = nf_nat_port_nfattr_to_range,
+       .range_to_nlattr        = nf_nat_port_range_to_nlattr,
+       .nlattr_to_range        = nf_nat_port_nlattr_to_range,
 #endif
 };
 
        .in_range               = udp_in_range,
        .unique_tuple           = udp_unique_tuple,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .range_to_nfattr        = nf_nat_port_range_to_nfattr,
-       .nfattr_to_range        = nf_nat_port_nfattr_to_range,
+       .range_to_nlattr        = nf_nat_port_range_to_nlattr,
+       .nlattr_to_range        = nf_nat_port_nlattr_to_range,
 #endif
 };
 
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netfilter/nfnetlink_conntrack.h>
 
-static int ipv6_tuple_to_nfattr(struct sk_buff *skb,
+static int ipv6_tuple_to_nlattr(struct sk_buff *skb,
                                const struct nf_conntrack_tuple *tuple)
 {
        NLA_PUT(skb, CTA_IP_V6_SRC, sizeof(u_int32_t) * 4,
        [CTA_IP_V6_DST] = sizeof(u_int32_t)*4,
 };
 
-static int ipv6_nfattr_to_tuple(struct nlattr *tb[],
+static int ipv6_nlattr_to_tuple(struct nlattr *tb[],
                                struct nf_conntrack_tuple *t)
 {
        if (!tb[CTA_IP_V6_SRC] || !tb[CTA_IP_V6_DST])
                return -EINVAL;
 
-       if (nfattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
+       if (nlattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
                return -EINVAL;
 
        memcpy(&t->src.u3.ip6, nla_data(tb[CTA_IP_V6_SRC]),
        .print_conntrack        = ipv6_print_conntrack,
        .get_l4proto            = ipv6_get_l4proto,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = ipv6_tuple_to_nfattr,
-       .nfattr_to_tuple        = ipv6_nfattr_to_tuple,
+       .tuple_to_nlattr        = ipv6_tuple_to_nlattr,
+       .nlattr_to_tuple        = ipv6_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_path         = nf_net_netfilter_sysctl_path,
 
 
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netfilter/nfnetlink_conntrack.h>
-static int icmpv6_tuple_to_nfattr(struct sk_buff *skb,
+static int icmpv6_tuple_to_nlattr(struct sk_buff *skb,
                                  const struct nf_conntrack_tuple *t)
 {
        NLA_PUT(skb, CTA_PROTO_ICMPV6_ID, sizeof(u_int16_t),
        [CTA_PROTO_ICMPV6_ID]   = sizeof(u_int16_t)
 };
 
-static int icmpv6_nfattr_to_tuple(struct nlattr *tb[],
+static int icmpv6_nlattr_to_tuple(struct nlattr *tb[],
                                struct nf_conntrack_tuple *tuple)
 {
        if (!tb[CTA_PROTO_ICMPV6_TYPE]
            || !tb[CTA_PROTO_ICMPV6_ID])
                return -EINVAL;
 
-       if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
+       if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
                return -EINVAL;
 
        tuple->dst.u.icmp.type =
        .new                    = icmpv6_new,
        .error                  = icmpv6_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = icmpv6_tuple_to_nfattr,
-       .nfattr_to_tuple        = icmpv6_nfattr_to_tuple,
+       .tuple_to_nlattr        = icmpv6_tuple_to_nlattr,
+       .nlattr_to_tuple        = icmpv6_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_header       = &icmpv6_sysctl_header,
 
 /* Generic function for tcp/udp/sctp/dccp and alike. This needs to be
  * in ip_conntrack_core, since we don't want the protocols to autoload
  * or depend on ctnetlink */
-int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,
+int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
                               const struct nf_conntrack_tuple *tuple)
 {
        NLA_PUT(skb, CTA_PROTO_SRC_PORT, sizeof(u_int16_t),
 nla_put_failure:
        return -1;
 }
-EXPORT_SYMBOL_GPL(nf_ct_port_tuple_to_nfattr);
+EXPORT_SYMBOL_GPL(nf_ct_port_tuple_to_nlattr);
 
 static const size_t cta_min_proto[CTA_PROTO_MAX+1] = {
        [CTA_PROTO_SRC_PORT]  = sizeof(u_int16_t),
        [CTA_PROTO_DST_PORT]  = sizeof(u_int16_t)
 };
 
-int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[],
+int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
                               struct nf_conntrack_tuple *t)
 {
        if (!tb[CTA_PROTO_SRC_PORT] || !tb[CTA_PROTO_DST_PORT])
                return -EINVAL;
 
-       if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
+       if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
                return -EINVAL;
 
        t->src.u.tcp.port = *(__be16 *)nla_data(tb[CTA_PROTO_SRC_PORT]);
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(nf_ct_port_nfattr_to_tuple);
+EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple);
 #endif
 
 /* Used by ipt_REJECT and ip6t_REJECT. */
 
                goto nla_put_failure;
        NLA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum);
 
-       if (likely(l4proto->tuple_to_nfattr))
-               ret = l4proto->tuple_to_nfattr(skb, tuple);
+       if (likely(l4proto->tuple_to_nlattr))
+               ret = l4proto->tuple_to_nlattr(skb, tuple);
 
        nla_nest_end(skb, nest_parms);
 
        if (!nest_parms)
                goto nla_put_failure;
 
-       if (likely(l3proto->tuple_to_nfattr))
-               ret = l3proto->tuple_to_nfattr(skb, tuple);
+       if (likely(l3proto->tuple_to_nlattr))
+               ret = l3proto->tuple_to_nlattr(skb, tuple);
 
        nla_nest_end(skb, nest_parms);
 
        struct nlattr *nest_proto;
        int ret;
 
-       if (!l4proto->to_nfattr) {
+       if (!l4proto->to_nlattr) {
                nf_ct_l4proto_put(l4proto);
                return 0;
        }
        if (!nest_proto)
                goto nla_put_failure;
 
-       ret = l4proto->to_nfattr(skb, nest_proto, ct);
+       ret = l4proto->to_nlattr(skb, nest_proto, ct);
 
        nf_ct_l4proto_put(l4proto);
 
                goto nla_put_failure;
        NLA_PUT(skb, CTA_HELP_NAME, strlen(helper->name), helper->name);
 
-       if (helper->to_nfattr)
-               helper->to_nfattr(skb, ct);
+       if (helper->to_nlattr)
+               helper->to_nlattr(skb, ct);
 
        nla_nest_end(skb, nest_helper);
 out:
 
        l3proto = nf_ct_l3proto_find_get(tuple->src.l3num);
 
-       if (likely(l3proto->nfattr_to_tuple))
-               ret = l3proto->nfattr_to_tuple(tb, tuple);
+       if (likely(l3proto->nlattr_to_tuple))
+               ret = l3proto->nlattr_to_tuple(tb, tuple);
 
        nf_ct_l3proto_put(l3proto);
 
 
        nla_parse_nested(tb, CTA_PROTO_MAX, attr, NULL);
 
-       if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
+       if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
                return -EINVAL;
 
        if (!tb[CTA_PROTO_NUM])
 
        l4proto = nf_ct_l4proto_find_get(tuple->src.l3num, tuple->dst.protonum);
 
-       if (likely(l4proto->nfattr_to_tuple))
-               ret = l4proto->nfattr_to_tuple(tb, tuple);
+       if (likely(l4proto->nlattr_to_tuple))
+               ret = l4proto->nlattr_to_tuple(tb, tuple);
 
        nf_ct_l4proto_put(l4proto);
 
 
        nla_parse_nested(tb, CTA_PROTONAT_MAX, attr, NULL);
 
-       if (nfattr_bad_size(tb, CTA_PROTONAT_MAX, cta_min_protonat))
+       if (nlattr_bad_size(tb, CTA_PROTONAT_MAX, cta_min_protonat))
                return -EINVAL;
 
        npt = nf_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum);
 
-       if (!npt->nfattr_to_range) {
+       if (!npt->nlattr_to_range) {
                nf_nat_proto_put(npt);
                return 0;
        }
 
-       /* nfattr_to_range returns 1 if it parsed, 0 if not, neg. on error */
-       if (npt->nfattr_to_range(tb, range) > 0)
+       /* nlattr_to_range returns 1 if it parsed, 0 if not, neg. on error */
+       if (npt->nlattr_to_range(tb, range) > 0)
                range->flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
 
        nf_nat_proto_put(npt);
 
        nla_parse_nested(tb, CTA_NAT_MAX, nat, NULL);
 
-       if (nfattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat))
+       if (nlattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat))
                return -EINVAL;
 
        if (tb[CTA_NAT_MINIP])
        u_int8_t u3 = nfmsg->nfgen_family;
        int err = 0;
 
-       if (nfattr_bad_size(cda, CTA_MAX, cta_min))
+       if (nlattr_bad_size(cda, CTA_MAX, cta_min))
                return -EINVAL;
 
        if (cda[CTA_TUPLE_ORIG])
                                          ctnetlink_done);
        }
 
-       if (nfattr_bad_size(cda, CTA_MAX, cta_min))
+       if (nlattr_bad_size(cda, CTA_MAX, cta_min))
                return -EINVAL;
 
        if (cda[CTA_TUPLE_ORIG])
 
        l4proto = nf_ct_l4proto_find_get(l3num, npt);
 
-       if (l4proto->from_nfattr)
-               err = l4proto->from_nfattr(tb, ct);
+       if (l4proto->from_nlattr)
+               err = l4proto->from_nlattr(tb, ct);
        nf_ct_l4proto_put(l4proto);
 
        return err;
        u_int8_t u3 = nfmsg->nfgen_family;
        int err = 0;
 
-       if (nfattr_bad_size(cda, CTA_MAX, cta_min))
+       if (nlattr_bad_size(cda, CTA_MAX, cta_min))
                return -EINVAL;
 
        if (cda[CTA_TUPLE_ORIG]) {
        u_int8_t u3 = nfmsg->nfgen_family;
        int err = 0;
 
-       if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
+       if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
                return -EINVAL;
 
        if (nlh->nlmsg_flags & NLM_F_DUMP) {
        unsigned int i;
        int err;
 
-       if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
+       if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
                return -EINVAL;
 
        if (cda[CTA_EXPECT_TUPLE]) {
        u_int8_t u3 = nfmsg->nfgen_family;
        int err = 0;
 
-       if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
+       if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
                return -EINVAL;
 
        if (!cda[CTA_EXPECT_TUPLE]
 
        .destroy         = gre_destroy,
        .me              = THIS_MODULE,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple,
+       .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
 #endif
 };
 
 
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netfilter/nfnetlink_conntrack.h>
 
-static int tcp_to_nfattr(struct sk_buff *skb, struct nlattr *nla,
+static int tcp_to_nlattr(struct sk_buff *skb, struct nlattr *nla,
                         const struct nf_conn *ct)
 {
        struct nlattr *nest_parms;
        [CTA_PROTOINFO_TCP_FLAGS_REPLY]     = sizeof(struct nf_ct_tcp_flags)
 };
 
-static int nfattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
+static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
 {
        struct nlattr *attr = cda[CTA_PROTOINFO_TCP];
        struct nlattr *tb[CTA_PROTOINFO_TCP_MAX+1];
 
        nla_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr, NULL);
 
-       if (nfattr_bad_size(tb, CTA_PROTOINFO_TCP_MAX, cta_min_tcp))
+       if (nlattr_bad_size(tb, CTA_PROTOINFO_TCP_MAX, cta_min_tcp))
                return -EINVAL;
 
        if (!tb[CTA_PROTOINFO_TCP_STATE])
        .new                    = tcp_new,
        .error                  = tcp_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .to_nfattr              = tcp_to_nfattr,
-       .from_nfattr            = nfattr_to_tcp,
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .to_nlattr              = tcp_to_nlattr,
+       .from_nlattr            = nlattr_to_tcp,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &tcp_sysctl_table_users,
        .new                    = tcp_new,
        .error                  = tcp_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .to_nfattr              = tcp_to_nfattr,
-       .from_nfattr            = nfattr_to_tcp,
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .to_nlattr              = tcp_to_nlattr,
+       .from_nlattr            = nlattr_to_tcp,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &tcp_sysctl_table_users,
 
        .new                    = udp_new,
        .error                  = udp_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &udp_sysctl_table_users,
        .new                    = udp_new,
        .error                  = udp_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &udp_sysctl_table_users,
 
        .new                    = udplite_new,
        .error                  = udplite_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &udplite_sysctl_table_users,
        .new                    = udplite_new,
        .error                  = udplite_error,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .tuple_to_nfattr        = nf_ct_port_tuple_to_nfattr,
-       .nfattr_to_tuple        = nf_ct_port_nfattr_to_tuple,
+       .tuple_to_nlattr        = nf_ct_port_tuple_to_nlattr,
+       .nlattr_to_tuple        = nf_ct_port_nlattr_to_tuple,
 #endif
 #ifdef CONFIG_SYSCTL
        .ctl_table_users        = &udplite_sysctl_table_users,
 
 
        UDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));
 
-       if (nfattr_bad_size(nfula, NFULA_CFG_MAX, nfula_cfg_min)) {
+       if (nlattr_bad_size(nfula, NFULA_CFG_MAX, nfula_cfg_min)) {
                UDEBUG("bad attribute size\n");
                return -EINVAL;
        }
 
        struct nfqnl_queue_entry *entry;
        int err;
 
-       if (nfattr_bad_size(nfqa, NFQA_MAX, nfqa_verdict_min)) {
+       if (nlattr_bad_size(nfqa, NFQA_MAX, nfqa_verdict_min)) {
                QDEBUG("bad attribute size\n");
                return -EINVAL;
        }
 
        QDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));
 
-       if (nfattr_bad_size(nfqa, NFQA_CFG_MAX, nfqa_cfg_min)) {
+       if (nlattr_bad_size(nfqa, NFQA_CFG_MAX, nfqa_cfg_min)) {
                QDEBUG("bad attribute size\n");
                return -EINVAL;
        }