aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-09-28 17:37:41 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:53:32 -0400
commitfdf708322d4658daa6eb795d1a835b97efdb335e (patch)
tree101258e5e2316c139106d7d69726b8370c1bc1a2
parentdf6fb868d6118686805c2fa566e213a8f31c8e4f (diff)
[NETFILTER]: nfnetlink: rename functions containing 'nfattr'
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>
-rw-r--r--include/linux/netfilter/nfnetlink.h2
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h2
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h12
-rw-r--r--include/net/netfilter/nf_nat_protocol.h8
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c10
-rw-r--r--net/ipv4/netfilter/nf_conntrack_proto_icmp.c10
-rw-r--r--net/ipv4/netfilter/nf_nat_core.c8
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_gre.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_icmp.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_tcp.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_udp.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c10
-rw-r--r--net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c10
-rw-r--r--net/netfilter/nf_conntrack_core.c10
-rw-r--r--net/netfilter/nf_conntrack_netlink.c52
-rw-r--r--net/netfilter/nf_conntrack_proto_gre.c4
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c22
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c8
-rw-r--r--net/netfilter/nf_conntrack_proto_udplite.c8
-rw-r--r--net/netfilter/nfnetlink_log.c2
-rw-r--r--net/netfilter/nfnetlink_queue.c4
22 files changed, 101 insertions, 101 deletions
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 47457b4c8c62..e61a8a5fcaff 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -72,7 +72,7 @@ struct nfnetlink_subsystem
72extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n); 72extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
73extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); 73extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
74 74
75#define nfattr_bad_size(tb, max, cta_min) \ 75#define nlattr_bad_size(tb, max, cta_min) \
76({ int __i, __res = 0; \ 76({ int __i, __res = 0; \
77 for (__i=1; __i <= max; __i++) { \ 77 for (__i=1; __i <= max; __i++) { \
78 if (!cta_min[__i]) \ 78 if (!cta_min[__i]) \
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index d04f99964d94..0dcc4c828ce9 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -36,7 +36,7 @@ struct nf_conntrack_helper
36 36
37 void (*destroy)(struct nf_conn *ct); 37 void (*destroy)(struct nf_conn *ct);
38 38
39 int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct); 39 int (*to_nlattr)(struct sk_buff *skb, const struct nf_conn *ct);
40}; 40};
41 41
42extern struct nf_conntrack_helper * 42extern struct nf_conntrack_helper *
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index c02402d5ec36..f6c372d4ec1f 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -63,10 +63,10 @@ struct nf_conntrack_l3proto
63 int (*get_l4proto)(const struct sk_buff *skb, unsigned int nhoff, 63 int (*get_l4proto)(const struct sk_buff *skb, unsigned int nhoff,
64 unsigned int *dataoff, u_int8_t *protonum); 64 unsigned int *dataoff, u_int8_t *protonum);
65 65
66 int (*tuple_to_nfattr)(struct sk_buff *skb, 66 int (*tuple_to_nlattr)(struct sk_buff *skb,
67 const struct nf_conntrack_tuple *t); 67 const struct nf_conntrack_tuple *t);
68 68
69 int (*nfattr_to_tuple)(struct nlattr *tb[], 69 int (*nlattr_to_tuple)(struct nlattr *tb[],
70 struct nf_conntrack_tuple *t); 70 struct nf_conntrack_tuple *t);
71 71
72#ifdef CONFIG_SYSCTL 72#ifdef CONFIG_SYSCTL
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index a43c4e484ea1..658daccc6b56 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -65,15 +65,15 @@ struct nf_conntrack_l4proto
65 int pf, unsigned int hooknum); 65 int pf, unsigned int hooknum);
66 66
67 /* convert protoinfo to nfnetink attributes */ 67 /* convert protoinfo to nfnetink attributes */
68 int (*to_nfattr)(struct sk_buff *skb, struct nlattr *nla, 68 int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla,
69 const struct nf_conn *ct); 69 const struct nf_conn *ct);
70 70
71 /* convert nfnetlink attributes to protoinfo */ 71 /* convert nfnetlink attributes to protoinfo */
72 int (*from_nfattr)(struct nlattr *tb[], struct nf_conn *ct); 72 int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct);
73 73
74 int (*tuple_to_nfattr)(struct sk_buff *skb, 74 int (*tuple_to_nlattr)(struct sk_buff *skb,
75 const struct nf_conntrack_tuple *t); 75 const struct nf_conntrack_tuple *t);
76 int (*nfattr_to_tuple)(struct nlattr *tb[], 76 int (*nlattr_to_tuple)(struct nlattr *tb[],
77 struct nf_conntrack_tuple *t); 77 struct nf_conntrack_tuple *t);
78 78
79#ifdef CONFIG_SYSCTL 79#ifdef CONFIG_SYSCTL
@@ -111,9 +111,9 @@ extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
111extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); 111extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
112 112
113/* Generic netlink helpers */ 113/* Generic netlink helpers */
114extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, 114extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
115 const struct nf_conntrack_tuple *tuple); 115 const struct nf_conntrack_tuple *tuple);
116extern int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[], 116extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
117 struct nf_conntrack_tuple *t); 117 struct nf_conntrack_tuple *t);
118 118
119/* Log invalid packets */ 119/* Log invalid packets */
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h
index 90a82de7e7e0..14c7b2d7263c 100644
--- a/include/net/netfilter/nf_nat_protocol.h
+++ b/include/net/netfilter/nf_nat_protocol.h
@@ -38,10 +38,10 @@ struct nf_nat_protocol
38 enum nf_nat_manip_type maniptype, 38 enum nf_nat_manip_type maniptype,
39 const struct nf_conn *ct); 39 const struct nf_conn *ct);
40 40
41 int (*range_to_nfattr)(struct sk_buff *skb, 41 int (*range_to_nlattr)(struct sk_buff *skb,
42 const struct nf_nat_range *range); 42 const struct nf_nat_range *range);
43 43
44 int (*nfattr_to_range)(struct nlattr *tb[], 44 int (*nlattr_to_range)(struct nlattr *tb[],
45 struct nf_nat_range *range); 45 struct nf_nat_range *range);
46}; 46};
47 47
@@ -62,9 +62,9 @@ extern int init_protocols(void) __init;
62extern void cleanup_protocols(void); 62extern void cleanup_protocols(void);
63extern struct nf_nat_protocol *find_nat_proto(u_int16_t protonum); 63extern struct nf_nat_protocol *find_nat_proto(u_int16_t protonum);
64 64
65extern int nf_nat_port_range_to_nfattr(struct sk_buff *skb, 65extern int nf_nat_port_range_to_nlattr(struct sk_buff *skb,
66 const struct nf_nat_range *range); 66 const struct nf_nat_range *range);
67extern int nf_nat_port_nfattr_to_range(struct nlattr *tb[], 67extern int nf_nat_port_nlattr_to_range(struct nlattr *tb[],
68 struct nf_nat_range *range); 68 struct nf_nat_range *range);
69 69
70#endif /*_NF_NAT_PROTO_H*/ 70#endif /*_NF_NAT_PROTO_H*/
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index f8771e058b9e..77ca556aad91 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -360,7 +360,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len)
360#include <linux/netfilter/nfnetlink.h> 360#include <linux/netfilter/nfnetlink.h>
361#include <linux/netfilter/nfnetlink_conntrack.h> 361#include <linux/netfilter/nfnetlink_conntrack.h>
362 362
363static int ipv4_tuple_to_nfattr(struct sk_buff *skb, 363static int ipv4_tuple_to_nlattr(struct sk_buff *skb,
364 const struct nf_conntrack_tuple *tuple) 364 const struct nf_conntrack_tuple *tuple)
365{ 365{
366 NLA_PUT(skb, CTA_IP_V4_SRC, sizeof(u_int32_t), 366 NLA_PUT(skb, CTA_IP_V4_SRC, sizeof(u_int32_t),
@@ -378,13 +378,13 @@ static const size_t cta_min_ip[CTA_IP_MAX+1] = {
378 [CTA_IP_V4_DST] = sizeof(u_int32_t), 378 [CTA_IP_V4_DST] = sizeof(u_int32_t),
379}; 379};
380 380
381static int ipv4_nfattr_to_tuple(struct nlattr *tb[], 381static int ipv4_nlattr_to_tuple(struct nlattr *tb[],
382 struct nf_conntrack_tuple *t) 382 struct nf_conntrack_tuple *t)
383{ 383{
384 if (!tb[CTA_IP_V4_SRC] || !tb[CTA_IP_V4_DST]) 384 if (!tb[CTA_IP_V4_SRC] || !tb[CTA_IP_V4_DST])
385 return -EINVAL; 385 return -EINVAL;
386 386
387 if (nfattr_bad_size(tb, CTA_IP_MAX, cta_min_ip)) 387 if (nlattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
388 return -EINVAL; 388 return -EINVAL;
389 389
390 t->src.u3.ip = *(__be32 *)nla_data(tb[CTA_IP_V4_SRC]); 390 t->src.u3.ip = *(__be32 *)nla_data(tb[CTA_IP_V4_SRC]);
@@ -411,8 +411,8 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
411 .print_conntrack = ipv4_print_conntrack, 411 .print_conntrack = ipv4_print_conntrack,
412 .get_l4proto = ipv4_get_l4proto, 412 .get_l4proto = ipv4_get_l4proto,
413#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 413#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
414 .tuple_to_nfattr = ipv4_tuple_to_nfattr, 414 .tuple_to_nlattr = ipv4_tuple_to_nlattr,
415 .nfattr_to_tuple = ipv4_nfattr_to_tuple, 415 .nlattr_to_tuple = ipv4_nlattr_to_tuple,
416#endif 416#endif
417#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT) 417#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
418 .ctl_table_path = nf_net_ipv4_netfilter_sysctl_path, 418 .ctl_table_path = nf_net_ipv4_netfilter_sysctl_path,
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
index 714332b8869e..ca7252c10758 100644
--- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
@@ -232,7 +232,7 @@ icmp_error(struct sk_buff *skb, unsigned int dataoff,
232#include <linux/netfilter/nfnetlink.h> 232#include <linux/netfilter/nfnetlink.h>
233#include <linux/netfilter/nfnetlink_conntrack.h> 233#include <linux/netfilter/nfnetlink_conntrack.h>
234 234
235static int icmp_tuple_to_nfattr(struct sk_buff *skb, 235static int icmp_tuple_to_nlattr(struct sk_buff *skb,
236 const struct nf_conntrack_tuple *t) 236 const struct nf_conntrack_tuple *t)
237{ 237{
238 NLA_PUT(skb, CTA_PROTO_ICMP_ID, sizeof(u_int16_t), 238 NLA_PUT(skb, CTA_PROTO_ICMP_ID, sizeof(u_int16_t),
@@ -254,7 +254,7 @@ static const size_t cta_min_proto[CTA_PROTO_MAX+1] = {
254 [CTA_PROTO_ICMP_ID] = sizeof(u_int16_t) 254 [CTA_PROTO_ICMP_ID] = sizeof(u_int16_t)
255}; 255};
256 256
257static int icmp_nfattr_to_tuple(struct nlattr *tb[], 257static int icmp_nlattr_to_tuple(struct nlattr *tb[],
258 struct nf_conntrack_tuple *tuple) 258 struct nf_conntrack_tuple *tuple)
259{ 259{
260 if (!tb[CTA_PROTO_ICMP_TYPE] 260 if (!tb[CTA_PROTO_ICMP_TYPE]
@@ -262,7 +262,7 @@ static int icmp_nfattr_to_tuple(struct nlattr *tb[],
262 || !tb[CTA_PROTO_ICMP_ID]) 262 || !tb[CTA_PROTO_ICMP_ID])
263 return -EINVAL; 263 return -EINVAL;
264 264
265 if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto)) 265 if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
266 return -EINVAL; 266 return -EINVAL;
267 267
268 tuple->dst.u.icmp.type = 268 tuple->dst.u.icmp.type =
@@ -327,8 +327,8 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp __read_mostly =
327 .destroy = NULL, 327 .destroy = NULL,
328 .me = NULL, 328 .me = NULL,
329#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 329#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
330 .tuple_to_nfattr = icmp_tuple_to_nfattr, 330 .tuple_to_nlattr = icmp_tuple_to_nlattr,
331 .nfattr_to_tuple = icmp_nfattr_to_tuple, 331 .nlattr_to_tuple = icmp_nlattr_to_tuple,
332#endif 332#endif
333#ifdef CONFIG_SYSCTL 333#ifdef CONFIG_SYSCTL
334 .ctl_table_header = &icmp_sysctl_header, 334 .ctl_table_header = &icmp_sysctl_header,
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index 4bdbb128fe50..7221aa20e6ff 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -544,7 +544,7 @@ EXPORT_SYMBOL(nf_nat_protocol_unregister);
544 544
545#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 545#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
546int 546int
547nf_nat_port_range_to_nfattr(struct sk_buff *skb, 547nf_nat_port_range_to_nlattr(struct sk_buff *skb,
548 const struct nf_nat_range *range) 548 const struct nf_nat_range *range)
549{ 549{
550 NLA_PUT(skb, CTA_PROTONAT_PORT_MIN, sizeof(__be16), 550 NLA_PUT(skb, CTA_PROTONAT_PORT_MIN, sizeof(__be16),
@@ -557,10 +557,10 @@ nf_nat_port_range_to_nfattr(struct sk_buff *skb,
557nla_put_failure: 557nla_put_failure:
558 return -1; 558 return -1;
559} 559}
560EXPORT_SYMBOL_GPL(nf_nat_port_nfattr_to_range); 560EXPORT_SYMBOL_GPL(nf_nat_port_nlattr_to_range);
561 561
562int 562int
563nf_nat_port_nfattr_to_range(struct nlattr *tb[], struct nf_nat_range *range) 563nf_nat_port_nlattr_to_range(struct nlattr *tb[], struct nf_nat_range *range)
564{ 564{
565 int ret = 0; 565 int ret = 0;
566 566
@@ -583,7 +583,7 @@ nf_nat_port_nfattr_to_range(struct nlattr *tb[], struct nf_nat_range *range)
583 583
584 return ret; 584 return ret;
585} 585}
586EXPORT_SYMBOL_GPL(nf_nat_port_range_to_nfattr); 586EXPORT_SYMBOL_GPL(nf_nat_port_range_to_nlattr);
587#endif 587#endif
588 588
589/* Noone using conntrack by the time this called. */ 589/* Noone using conntrack by the time this called. */
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index 2e40cc83526a..d562290b1820 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -142,8 +142,8 @@ static struct nf_nat_protocol gre __read_mostly = {
142 .in_range = gre_in_range, 142 .in_range = gre_in_range,
143 .unique_tuple = gre_unique_tuple, 143 .unique_tuple = gre_unique_tuple,
144#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 144#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
145 .range_to_nfattr = nf_nat_port_range_to_nfattr, 145 .range_to_nlattr = nf_nat_port_range_to_nlattr,
146 .nfattr_to_range = nf_nat_port_nfattr_to_range, 146 .nlattr_to_range = nf_nat_port_nlattr_to_range,
147#endif 147#endif
148}; 148};
149 149
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c
index f71ef9b5f428..898d73771155 100644
--- a/net/ipv4/netfilter/nf_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c
@@ -79,7 +79,7 @@ struct nf_nat_protocol nf_nat_protocol_icmp = {
79 .in_range = icmp_in_range, 79 .in_range = icmp_in_range,
80 .unique_tuple = icmp_unique_tuple, 80 .unique_tuple = icmp_unique_tuple,
81#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 81#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
82 .range_to_nfattr = nf_nat_port_range_to_nfattr, 82 .range_to_nlattr = nf_nat_port_range_to_nlattr,
83 .nfattr_to_range = nf_nat_port_nfattr_to_range, 83 .nlattr_to_range = nf_nat_port_nlattr_to_range,
84#endif 84#endif
85}; 85};
diff --git a/net/ipv4/netfilter/nf_nat_proto_tcp.c b/net/ipv4/netfilter/nf_nat_proto_tcp.c
index 123c95913f28..5bbbb2acdc70 100644
--- a/net/ipv4/netfilter/nf_nat_proto_tcp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c
@@ -145,7 +145,7 @@ struct nf_nat_protocol nf_nat_protocol_tcp = {
145 .in_range = tcp_in_range, 145 .in_range = tcp_in_range,
146 .unique_tuple = tcp_unique_tuple, 146 .unique_tuple = tcp_unique_tuple,
147#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 147#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
148 .range_to_nfattr = nf_nat_port_range_to_nfattr, 148 .range_to_nlattr = nf_nat_port_range_to_nlattr,
149 .nfattr_to_range = nf_nat_port_nfattr_to_range, 149 .nlattr_to_range = nf_nat_port_nlattr_to_range,
150#endif 150#endif
151}; 151};
diff --git a/net/ipv4/netfilter/nf_nat_proto_udp.c b/net/ipv4/netfilter/nf_nat_proto_udp.c
index 1c4c70e25cd4..a0af4fd95584 100644
--- a/net/ipv4/netfilter/nf_nat_proto_udp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_udp.c
@@ -135,7 +135,7 @@ struct nf_nat_protocol nf_nat_protocol_udp = {
135 .in_range = udp_in_range, 135 .in_range = udp_in_range,
136 .unique_tuple = udp_unique_tuple, 136 .unique_tuple = udp_unique_tuple,
137#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 137#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
138 .range_to_nfattr = nf_nat_port_range_to_nfattr, 138 .range_to_nlattr = nf_nat_port_range_to_nlattr,
139 .nfattr_to_range = nf_nat_port_nfattr_to_range, 139 .nlattr_to_range = nf_nat_port_nlattr_to_range,
140#endif 140#endif
141}; 141};
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index f0ea3fb51670..567fbe230ce6 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -337,7 +337,7 @@ static ctl_table nf_ct_ipv6_sysctl_table[] = {
337#include <linux/netfilter/nfnetlink.h> 337#include <linux/netfilter/nfnetlink.h>
338#include <linux/netfilter/nfnetlink_conntrack.h> 338#include <linux/netfilter/nfnetlink_conntrack.h>
339 339
340static int ipv6_tuple_to_nfattr(struct sk_buff *skb, 340static int ipv6_tuple_to_nlattr(struct sk_buff *skb,
341 const struct nf_conntrack_tuple *tuple) 341 const struct nf_conntrack_tuple *tuple)
342{ 342{
343 NLA_PUT(skb, CTA_IP_V6_SRC, sizeof(u_int32_t) * 4, 343 NLA_PUT(skb, CTA_IP_V6_SRC, sizeof(u_int32_t) * 4,
@@ -355,13 +355,13 @@ static const size_t cta_min_ip[CTA_IP_MAX+1] = {
355 [CTA_IP_V6_DST] = sizeof(u_int32_t)*4, 355 [CTA_IP_V6_DST] = sizeof(u_int32_t)*4,
356}; 356};
357 357
358static int ipv6_nfattr_to_tuple(struct nlattr *tb[], 358static int ipv6_nlattr_to_tuple(struct nlattr *tb[],
359 struct nf_conntrack_tuple *t) 359 struct nf_conntrack_tuple *t)
360{ 360{
361 if (!tb[CTA_IP_V6_SRC] || !tb[CTA_IP_V6_DST]) 361 if (!tb[CTA_IP_V6_SRC] || !tb[CTA_IP_V6_DST])
362 return -EINVAL; 362 return -EINVAL;
363 363
364 if (nfattr_bad_size(tb, CTA_IP_MAX, cta_min_ip)) 364 if (nlattr_bad_size(tb, CTA_IP_MAX, cta_min_ip))
365 return -EINVAL; 365 return -EINVAL;
366 366
367 memcpy(&t->src.u3.ip6, nla_data(tb[CTA_IP_V6_SRC]), 367 memcpy(&t->src.u3.ip6, nla_data(tb[CTA_IP_V6_SRC]),
@@ -382,8 +382,8 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6 __read_mostly = {
382 .print_conntrack = ipv6_print_conntrack, 382 .print_conntrack = ipv6_print_conntrack,
383 .get_l4proto = ipv6_get_l4proto, 383 .get_l4proto = ipv6_get_l4proto,
384#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 384#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
385 .tuple_to_nfattr = ipv6_tuple_to_nfattr, 385 .tuple_to_nlattr = ipv6_tuple_to_nlattr,
386 .nfattr_to_tuple = ipv6_nfattr_to_tuple, 386 .nlattr_to_tuple = ipv6_nlattr_to_tuple,
387#endif 387#endif
388#ifdef CONFIG_SYSCTL 388#ifdef CONFIG_SYSCTL
389 .ctl_table_path = nf_net_netfilter_sysctl_path, 389 .ctl_table_path = nf_net_netfilter_sysctl_path,
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index c18183823faf..238ea6bc864e 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -210,7 +210,7 @@ icmpv6_error(struct sk_buff *skb, unsigned int dataoff,
210 210
211#include <linux/netfilter/nfnetlink.h> 211#include <linux/netfilter/nfnetlink.h>
212#include <linux/netfilter/nfnetlink_conntrack.h> 212#include <linux/netfilter/nfnetlink_conntrack.h>
213static int icmpv6_tuple_to_nfattr(struct sk_buff *skb, 213static int icmpv6_tuple_to_nlattr(struct sk_buff *skb,
214 const struct nf_conntrack_tuple *t) 214 const struct nf_conntrack_tuple *t)
215{ 215{
216 NLA_PUT(skb, CTA_PROTO_ICMPV6_ID, sizeof(u_int16_t), 216 NLA_PUT(skb, CTA_PROTO_ICMPV6_ID, sizeof(u_int16_t),
@@ -232,7 +232,7 @@ static const size_t cta_min_proto[CTA_PROTO_MAX+1] = {
232 [CTA_PROTO_ICMPV6_ID] = sizeof(u_int16_t) 232 [CTA_PROTO_ICMPV6_ID] = sizeof(u_int16_t)
233}; 233};
234 234
235static int icmpv6_nfattr_to_tuple(struct nlattr *tb[], 235static int icmpv6_nlattr_to_tuple(struct nlattr *tb[],
236 struct nf_conntrack_tuple *tuple) 236 struct nf_conntrack_tuple *tuple)
237{ 237{
238 if (!tb[CTA_PROTO_ICMPV6_TYPE] 238 if (!tb[CTA_PROTO_ICMPV6_TYPE]
@@ -240,7 +240,7 @@ static int icmpv6_nfattr_to_tuple(struct nlattr *tb[],
240 || !tb[CTA_PROTO_ICMPV6_ID]) 240 || !tb[CTA_PROTO_ICMPV6_ID])
241 return -EINVAL; 241 return -EINVAL;
242 242
243 if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto)) 243 if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
244 return -EINVAL; 244 return -EINVAL;
245 245
246 tuple->dst.u.icmp.type = 246 tuple->dst.u.icmp.type =
@@ -289,8 +289,8 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 __read_mostly =
289 .new = icmpv6_new, 289 .new = icmpv6_new,
290 .error = icmpv6_error, 290 .error = icmpv6_error,
291#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 291#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
292 .tuple_to_nfattr = icmpv6_tuple_to_nfattr, 292 .tuple_to_nlattr = icmpv6_tuple_to_nlattr,
293 .nfattr_to_tuple = icmpv6_nfattr_to_tuple, 293 .nlattr_to_tuple = icmpv6_nlattr_to_tuple,
294#endif 294#endif
295#ifdef CONFIG_SYSCTL 295#ifdef CONFIG_SYSCTL
296 .ctl_table_header = &icmpv6_sysctl_header, 296 .ctl_table_header = &icmpv6_sysctl_header,
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index b64656abc4e0..9edaaf2d57e7 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -830,7 +830,7 @@ EXPORT_SYMBOL_GPL(__nf_ct_refresh_acct);
830/* Generic function for tcp/udp/sctp/dccp and alike. This needs to be 830/* Generic function for tcp/udp/sctp/dccp and alike. This needs to be
831 * in ip_conntrack_core, since we don't want the protocols to autoload 831 * in ip_conntrack_core, since we don't want the protocols to autoload
832 * or depend on ctnetlink */ 832 * or depend on ctnetlink */
833int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, 833int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
834 const struct nf_conntrack_tuple *tuple) 834 const struct nf_conntrack_tuple *tuple)
835{ 835{
836 NLA_PUT(skb, CTA_PROTO_SRC_PORT, sizeof(u_int16_t), 836 NLA_PUT(skb, CTA_PROTO_SRC_PORT, sizeof(u_int16_t),
@@ -842,20 +842,20 @@ int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,
842nla_put_failure: 842nla_put_failure:
843 return -1; 843 return -1;
844} 844}
845EXPORT_SYMBOL_GPL(nf_ct_port_tuple_to_nfattr); 845EXPORT_SYMBOL_GPL(nf_ct_port_tuple_to_nlattr);
846 846
847static const size_t cta_min_proto[CTA_PROTO_MAX+1] = { 847static const size_t cta_min_proto[CTA_PROTO_MAX+1] = {
848 [CTA_PROTO_SRC_PORT] = sizeof(u_int16_t), 848 [CTA_PROTO_SRC_PORT] = sizeof(u_int16_t),
849 [CTA_PROTO_DST_PORT] = sizeof(u_int16_t) 849 [CTA_PROTO_DST_PORT] = sizeof(u_int16_t)
850}; 850};
851 851
852int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[], 852int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
853 struct nf_conntrack_tuple *t) 853 struct nf_conntrack_tuple *t)
854{ 854{
855 if (!tb[CTA_PROTO_SRC_PORT] || !tb[CTA_PROTO_DST_PORT]) 855 if (!tb[CTA_PROTO_SRC_PORT] || !tb[CTA_PROTO_DST_PORT])
856 return -EINVAL; 856 return -EINVAL;
857 857
858 if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto)) 858 if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
859 return -EINVAL; 859 return -EINVAL;
860 860
861 t->src.u.tcp.port = *(__be16 *)nla_data(tb[CTA_PROTO_SRC_PORT]); 861 t->src.u.tcp.port = *(__be16 *)nla_data(tb[CTA_PROTO_SRC_PORT]);
@@ -863,7 +863,7 @@ int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[],
863 863
864 return 0; 864 return 0;
865} 865}
866EXPORT_SYMBOL_GPL(nf_ct_port_nfattr_to_tuple); 866EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple);
867#endif 867#endif
868 868
869/* Used by ipt_REJECT and ip6t_REJECT. */ 869/* Used by ipt_REJECT and ip6t_REJECT. */
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 221c38f889bf..9f9bef2446a1 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -61,8 +61,8 @@ ctnetlink_dump_tuples_proto(struct sk_buff *skb,
61 goto nla_put_failure; 61 goto nla_put_failure;
62 NLA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum); 62 NLA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum);
63 63
64 if (likely(l4proto->tuple_to_nfattr)) 64 if (likely(l4proto->tuple_to_nlattr))
65 ret = l4proto->tuple_to_nfattr(skb, tuple); 65 ret = l4proto->tuple_to_nlattr(skb, tuple);
66 66
67 nla_nest_end(skb, nest_parms); 67 nla_nest_end(skb, nest_parms);
68 68
@@ -84,8 +84,8 @@ ctnetlink_dump_tuples_ip(struct sk_buff *skb,
84 if (!nest_parms) 84 if (!nest_parms)
85 goto nla_put_failure; 85 goto nla_put_failure;
86 86
87 if (likely(l3proto->tuple_to_nfattr)) 87 if (likely(l3proto->tuple_to_nlattr))
88 ret = l3proto->tuple_to_nfattr(skb, tuple); 88 ret = l3proto->tuple_to_nlattr(skb, tuple);
89 89
90 nla_nest_end(skb, nest_parms); 90 nla_nest_end(skb, nest_parms);
91 91
@@ -153,7 +153,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct nf_conn *ct)
153 struct nlattr *nest_proto; 153 struct nlattr *nest_proto;
154 int ret; 154 int ret;
155 155
156 if (!l4proto->to_nfattr) { 156 if (!l4proto->to_nlattr) {
157 nf_ct_l4proto_put(l4proto); 157 nf_ct_l4proto_put(l4proto);
158 return 0; 158 return 0;
159 } 159 }
@@ -162,7 +162,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct nf_conn *ct)
162 if (!nest_proto) 162 if (!nest_proto)
163 goto nla_put_failure; 163 goto nla_put_failure;
164 164
165 ret = l4proto->to_nfattr(skb, nest_proto, ct); 165 ret = l4proto->to_nlattr(skb, nest_proto, ct);
166 166
167 nf_ct_l4proto_put(l4proto); 167 nf_ct_l4proto_put(l4proto);
168 168
@@ -195,8 +195,8 @@ ctnetlink_dump_helpinfo(struct sk_buff *skb, const struct nf_conn *ct)
195 goto nla_put_failure; 195 goto nla_put_failure;
196 NLA_PUT(skb, CTA_HELP_NAME, strlen(helper->name), helper->name); 196 NLA_PUT(skb, CTA_HELP_NAME, strlen(helper->name), helper->name);
197 197
198 if (helper->to_nfattr) 198 if (helper->to_nlattr)
199 helper->to_nfattr(skb, ct); 199 helper->to_nlattr(skb, ct);
200 200
201 nla_nest_end(skb, nest_helper); 201 nla_nest_end(skb, nest_helper);
202out: 202out:
@@ -512,8 +512,8 @@ ctnetlink_parse_tuple_ip(struct nlattr *attr, struct nf_conntrack_tuple *tuple)
512 512
513 l3proto = nf_ct_l3proto_find_get(tuple->src.l3num); 513 l3proto = nf_ct_l3proto_find_get(tuple->src.l3num);
514 514
515 if (likely(l3proto->nfattr_to_tuple)) 515 if (likely(l3proto->nlattr_to_tuple))
516 ret = l3proto->nfattr_to_tuple(tb, tuple); 516 ret = l3proto->nlattr_to_tuple(tb, tuple);
517 517
518 nf_ct_l3proto_put(l3proto); 518 nf_ct_l3proto_put(l3proto);
519 519
@@ -534,7 +534,7 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr,
534 534
535 nla_parse_nested(tb, CTA_PROTO_MAX, attr, NULL); 535 nla_parse_nested(tb, CTA_PROTO_MAX, attr, NULL);
536 536
537 if (nfattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto)) 537 if (nlattr_bad_size(tb, CTA_PROTO_MAX, cta_min_proto))
538 return -EINVAL; 538 return -EINVAL;
539 539
540 if (!tb[CTA_PROTO_NUM]) 540 if (!tb[CTA_PROTO_NUM])
@@ -543,8 +543,8 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr,
543 543
544 l4proto = nf_ct_l4proto_find_get(tuple->src.l3num, tuple->dst.protonum); 544 l4proto = nf_ct_l4proto_find_get(tuple->src.l3num, tuple->dst.protonum);
545 545
546 if (likely(l4proto->nfattr_to_tuple)) 546 if (likely(l4proto->nlattr_to_tuple))
547 ret = l4proto->nfattr_to_tuple(tb, tuple); 547 ret = l4proto->nlattr_to_tuple(tb, tuple);
548 548
549 nf_ct_l4proto_put(l4proto); 549 nf_ct_l4proto_put(l4proto);
550 550
@@ -602,18 +602,18 @@ static int nfnetlink_parse_nat_proto(struct nlattr *attr,
602 602
603 nla_parse_nested(tb, CTA_PROTONAT_MAX, attr, NULL); 603 nla_parse_nested(tb, CTA_PROTONAT_MAX, attr, NULL);
604 604
605 if (nfattr_bad_size(tb, CTA_PROTONAT_MAX, cta_min_protonat)) 605 if (nlattr_bad_size(tb, CTA_PROTONAT_MAX, cta_min_protonat))
606 return -EINVAL; 606 return -EINVAL;
607 607
608 npt = nf_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum); 608 npt = nf_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum);
609 609
610 if (!npt->nfattr_to_range) { 610 if (!npt->nlattr_to_range) {
611 nf_nat_proto_put(npt); 611 nf_nat_proto_put(npt);
612 return 0; 612 return 0;
613 } 613 }
614 614
615 /* nfattr_to_range returns 1 if it parsed, 0 if not, neg. on error */ 615 /* nlattr_to_range returns 1 if it parsed, 0 if not, neg. on error */
616 if (npt->nfattr_to_range(tb, range) > 0) 616 if (npt->nlattr_to_range(tb, range) > 0)
617 range->flags |= IP_NAT_RANGE_PROTO_SPECIFIED; 617 range->flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
618 618
619 nf_nat_proto_put(npt); 619 nf_nat_proto_put(npt);
@@ -637,7 +637,7 @@ nfnetlink_parse_nat(struct nlattr *nat,
637 637
638 nla_parse_nested(tb, CTA_NAT_MAX, nat, NULL); 638 nla_parse_nested(tb, CTA_NAT_MAX, nat, NULL);
639 639
640 if (nfattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat)) 640 if (nlattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat))
641 return -EINVAL; 641 return -EINVAL;
642 642
643 if (tb[CTA_NAT_MINIP]) 643 if (tb[CTA_NAT_MINIP])
@@ -696,7 +696,7 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb,
696 u_int8_t u3 = nfmsg->nfgen_family; 696 u_int8_t u3 = nfmsg->nfgen_family;
697 int err = 0; 697 int err = 0;
698 698
699 if (nfattr_bad_size(cda, CTA_MAX, cta_min)) 699 if (nlattr_bad_size(cda, CTA_MAX, cta_min))
700 return -EINVAL; 700 return -EINVAL;
701 701
702 if (cda[CTA_TUPLE_ORIG]) 702 if (cda[CTA_TUPLE_ORIG])
@@ -754,7 +754,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
754 ctnetlink_done); 754 ctnetlink_done);
755 } 755 }
756 756
757 if (nfattr_bad_size(cda, CTA_MAX, cta_min)) 757 if (nlattr_bad_size(cda, CTA_MAX, cta_min))
758 return -EINVAL; 758 return -EINVAL;
759 759
760 if (cda[CTA_TUPLE_ORIG]) 760 if (cda[CTA_TUPLE_ORIG])
@@ -928,8 +928,8 @@ ctnetlink_change_protoinfo(struct nf_conn *ct, struct nlattr *cda[])
928 928
929 l4proto = nf_ct_l4proto_find_get(l3num, npt); 929 l4proto = nf_ct_l4proto_find_get(l3num, npt);
930 930
931 if (l4proto->from_nfattr) 931 if (l4proto->from_nlattr)
932 err = l4proto->from_nfattr(tb, ct); 932 err = l4proto->from_nlattr(tb, ct);
933 nf_ct_l4proto_put(l4proto); 933 nf_ct_l4proto_put(l4proto);
934 934
935 return err; 935 return err;
@@ -1045,7 +1045,7 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
1045 u_int8_t u3 = nfmsg->nfgen_family; 1045 u_int8_t u3 = nfmsg->nfgen_family;
1046 int err = 0; 1046 int err = 0;
1047 1047
1048 if (nfattr_bad_size(cda, CTA_MAX, cta_min)) 1048 if (nlattr_bad_size(cda, CTA_MAX, cta_min))
1049 return -EINVAL; 1049 return -EINVAL;
1050 1050
1051 if (cda[CTA_TUPLE_ORIG]) { 1051 if (cda[CTA_TUPLE_ORIG]) {
@@ -1329,7 +1329,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
1329 u_int8_t u3 = nfmsg->nfgen_family; 1329 u_int8_t u3 = nfmsg->nfgen_family;
1330 int err = 0; 1330 int err = 0;
1331 1331
1332 if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp)) 1332 if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
1333 return -EINVAL; 1333 return -EINVAL;
1334 1334
1335 if (nlh->nlmsg_flags & NLM_F_DUMP) { 1335 if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -1393,7 +1393,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb,
1393 unsigned int i; 1393 unsigned int i;
1394 int err; 1394 int err;
1395 1395
1396 if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp)) 1396 if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
1397 return -EINVAL; 1397 return -EINVAL;
1398 1398
1399 if (cda[CTA_EXPECT_TUPLE]) { 1399 if (cda[CTA_EXPECT_TUPLE]) {
@@ -1534,7 +1534,7 @@ ctnetlink_new_expect(struct sock *ctnl, struct sk_buff *skb,
1534 u_int8_t u3 = nfmsg->nfgen_family; 1534 u_int8_t u3 = nfmsg->nfgen_family;
1535 int err = 0; 1535 int err = 0;
1536 1536
1537 if (nfattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp)) 1537 if (nlattr_bad_size(cda, CTA_EXPECT_MAX, cta_min_exp))
1538 return -EINVAL; 1538 return -EINVAL;
1539 1539
1540 if (!cda[CTA_EXPECT_TUPLE] 1540 if (!cda[CTA_EXPECT_TUPLE]
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index bdbead8a7a83..ff8d03b88402 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -274,8 +274,8 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 __read_mostly = {
274 .destroy = gre_destroy, 274 .destroy = gre_destroy,
275 .me = THIS_MODULE, 275 .me = THIS_MODULE,
276#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 276#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
277 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 277 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
278 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 278 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
279#endif 279#endif
280}; 280};
281 281
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 1d167e61cc44..84f47bc90f63 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -1067,7 +1067,7 @@ static int tcp_new(struct nf_conn *conntrack,
1067#include <linux/netfilter/nfnetlink.h> 1067#include <linux/netfilter/nfnetlink.h>
1068#include <linux/netfilter/nfnetlink_conntrack.h> 1068#include <linux/netfilter/nfnetlink_conntrack.h>
1069 1069
1070static int tcp_to_nfattr(struct sk_buff *skb, struct nlattr *nla, 1070static int tcp_to_nlattr(struct sk_buff *skb, struct nlattr *nla,
1071 const struct nf_conn *ct) 1071 const struct nf_conn *ct)
1072{ 1072{
1073 struct nlattr *nest_parms; 1073 struct nlattr *nest_parms;
@@ -1113,7 +1113,7 @@ static const size_t cta_min_tcp[CTA_PROTOINFO_TCP_MAX+1] = {
1113 [CTA_PROTOINFO_TCP_FLAGS_REPLY] = sizeof(struct nf_ct_tcp_flags) 1113 [CTA_PROTOINFO_TCP_FLAGS_REPLY] = sizeof(struct nf_ct_tcp_flags)
1114}; 1114};
1115 1115
1116static int nfattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct) 1116static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
1117{ 1117{
1118 struct nlattr *attr = cda[CTA_PROTOINFO_TCP]; 1118 struct nlattr *attr = cda[CTA_PROTOINFO_TCP];
1119 struct nlattr *tb[CTA_PROTOINFO_TCP_MAX+1]; 1119 struct nlattr *tb[CTA_PROTOINFO_TCP_MAX+1];
@@ -1125,7 +1125,7 @@ static int nfattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
1125 1125
1126 nla_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr, NULL); 1126 nla_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr, NULL);
1127 1127
1128 if (nfattr_bad_size(tb, CTA_PROTOINFO_TCP_MAX, cta_min_tcp)) 1128 if (nlattr_bad_size(tb, CTA_PROTOINFO_TCP_MAX, cta_min_tcp))
1129 return -EINVAL; 1129 return -EINVAL;
1130 1130
1131 if (!tb[CTA_PROTOINFO_TCP_STATE]) 1131 if (!tb[CTA_PROTOINFO_TCP_STATE])
@@ -1387,10 +1387,10 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 __read_mostly =
1387 .new = tcp_new, 1387 .new = tcp_new,
1388 .error = tcp_error, 1388 .error = tcp_error,
1389#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1389#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
1390 .to_nfattr = tcp_to_nfattr, 1390 .to_nlattr = tcp_to_nlattr,
1391 .from_nfattr = nfattr_to_tcp, 1391 .from_nlattr = nlattr_to_tcp,
1392 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 1392 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
1393 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 1393 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
1394#endif 1394#endif
1395#ifdef CONFIG_SYSCTL 1395#ifdef CONFIG_SYSCTL
1396 .ctl_table_users = &tcp_sysctl_table_users, 1396 .ctl_table_users = &tcp_sysctl_table_users,
@@ -1416,10 +1416,10 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 __read_mostly =
1416 .new = tcp_new, 1416 .new = tcp_new,
1417 .error = tcp_error, 1417 .error = tcp_error,
1418#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1418#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
1419 .to_nfattr = tcp_to_nfattr, 1419 .to_nlattr = tcp_to_nlattr,
1420 .from_nfattr = nfattr_to_tcp, 1420 .from_nlattr = nlattr_to_tcp,
1421 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 1421 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
1422 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 1422 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
1423#endif 1423#endif
1424#ifdef CONFIG_SYSCTL 1424#ifdef CONFIG_SYSCTL
1425 .ctl_table_users = &tcp_sysctl_table_users, 1425 .ctl_table_users = &tcp_sysctl_table_users,
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 2a2fd1a764ea..751ff7e2a0d9 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -203,8 +203,8 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 __read_mostly =
203 .new = udp_new, 203 .new = udp_new,
204 .error = udp_error, 204 .error = udp_error,
205#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 205#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
206 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 206 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
207 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 207 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
208#endif 208#endif
209#ifdef CONFIG_SYSCTL 209#ifdef CONFIG_SYSCTL
210 .ctl_table_users = &udp_sysctl_table_users, 210 .ctl_table_users = &udp_sysctl_table_users,
@@ -230,8 +230,8 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6 __read_mostly =
230 .new = udp_new, 230 .new = udp_new,
231 .error = udp_error, 231 .error = udp_error,
232#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 232#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
233 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 233 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
234 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 234 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
235#endif 235#endif
236#ifdef CONFIG_SYSCTL 236#ifdef CONFIG_SYSCTL
237 .ctl_table_users = &udp_sysctl_table_users, 237 .ctl_table_users = &udp_sysctl_table_users,
diff --git a/net/netfilter/nf_conntrack_proto_udplite.c b/net/netfilter/nf_conntrack_proto_udplite.c
index b906b413997c..4209ddb8fbaf 100644
--- a/net/netfilter/nf_conntrack_proto_udplite.c
+++ b/net/netfilter/nf_conntrack_proto_udplite.c
@@ -203,8 +203,8 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite4 __read_mostly =
203 .new = udplite_new, 203 .new = udplite_new,
204 .error = udplite_error, 204 .error = udplite_error,
205#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 205#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
206 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 206 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
207 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 207 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
208#endif 208#endif
209#ifdef CONFIG_SYSCTL 209#ifdef CONFIG_SYSCTL
210 .ctl_table_users = &udplite_sysctl_table_users, 210 .ctl_table_users = &udplite_sysctl_table_users,
@@ -226,8 +226,8 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite6 __read_mostly =
226 .new = udplite_new, 226 .new = udplite_new,
227 .error = udplite_error, 227 .error = udplite_error,
228#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 228#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
229 .tuple_to_nfattr = nf_ct_port_tuple_to_nfattr, 229 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
230 .nfattr_to_tuple = nf_ct_port_nfattr_to_tuple, 230 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
231#endif 231#endif
232#ifdef CONFIG_SYSCTL 232#ifdef CONFIG_SYSCTL
233 .ctl_table_users = &udplite_sysctl_table_users, 233 .ctl_table_users = &udplite_sysctl_table_users,
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index c7fd82f6cb7d..b656648537c6 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -769,7 +769,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
769 769
770 UDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type)); 770 UDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));
771 771
772 if (nfattr_bad_size(nfula, NFULA_CFG_MAX, nfula_cfg_min)) { 772 if (nlattr_bad_size(nfula, NFULA_CFG_MAX, nfula_cfg_min)) {
773 UDEBUG("bad attribute size\n"); 773 UDEBUG("bad attribute size\n");
774 return -EINVAL; 774 return -EINVAL;
775 } 775 }
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 068e88b46ba0..1c34668588f1 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -796,7 +796,7 @@ nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb,
796 struct nfqnl_queue_entry *entry; 796 struct nfqnl_queue_entry *entry;
797 int err; 797 int err;
798 798
799 if (nfattr_bad_size(nfqa, NFQA_MAX, nfqa_verdict_min)) { 799 if (nlattr_bad_size(nfqa, NFQA_MAX, nfqa_verdict_min)) {
800 QDEBUG("bad attribute size\n"); 800 QDEBUG("bad attribute size\n");
801 return -EINVAL; 801 return -EINVAL;
802 } 802 }
@@ -876,7 +876,7 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
876 876
877 QDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type)); 877 QDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));
878 878
879 if (nfattr_bad_size(nfqa, NFQA_CFG_MAX, nfqa_cfg_min)) { 879 if (nlattr_bad_size(nfqa, NFQA_CFG_MAX, nfqa_cfg_min)) {
880 QDEBUG("bad attribute size\n"); 880 QDEBUG("bad attribute size\n");
881 return -EINVAL; 881 return -EINVAL;
882 } 882 }