aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
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 /net/ipv4
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>
Diffstat (limited to 'net/ipv4')
-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
7 files changed, 22 insertions, 22 deletions
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};