aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-08 01:30:49 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:17:53 -0400
commit6823645d608541c2c69e8a99454936e058c294e0 (patch)
treee7b8b9200b4b03b7b787fc55f92c37c19076c225 /net/ipv4
parent53aba5979e1d964c0234816eda2316f1c2e7946d (diff)
[NETFILTER]: nf_conntrack_expect: function naming unification
Currently there is a wild mix of nf_conntrack_expect_, nf_ct_exp_, expect_, exp_, ... Consistently use nf_ct_ as prefix for exported functions. 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_compat.c6
-rw-r--r--net/ipv4/netfilter/nf_nat_amanda.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_ftp.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_h323.c26
-rw-r--r--net/ipv4/netfilter/nf_nat_irc.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_pptp.c6
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_tftp.c2
8 files changed, 28 insertions, 28 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
index 888f27fd884..12d6a6327b6 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
@@ -209,7 +209,7 @@ static const struct file_operations ct_file_ops = {
209/* expects */ 209/* expects */
210static void *exp_seq_start(struct seq_file *s, loff_t *pos) 210static void *exp_seq_start(struct seq_file *s, loff_t *pos)
211{ 211{
212 struct list_head *e = &nf_conntrack_expect_list; 212 struct list_head *e = &nf_ct_expect_list;
213 loff_t i; 213 loff_t i;
214 214
215 /* strange seq_file api calls stop even if we fail, 215 /* strange seq_file api calls stop even if we fail,
@@ -221,7 +221,7 @@ static void *exp_seq_start(struct seq_file *s, loff_t *pos)
221 221
222 for (i = 0; i <= *pos; i++) { 222 for (i = 0; i <= *pos; i++) {
223 e = e->next; 223 e = e->next;
224 if (e == &nf_conntrack_expect_list) 224 if (e == &nf_ct_expect_list)
225 return NULL; 225 return NULL;
226 } 226 }
227 return e; 227 return e;
@@ -234,7 +234,7 @@ static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
234 ++*pos; 234 ++*pos;
235 e = e->next; 235 e = e->next;
236 236
237 if (e == &nf_conntrack_expect_list) 237 if (e == &nf_ct_expect_list)
238 return NULL; 238 return NULL;
239 239
240 return e; 240 return e;
diff --git a/net/ipv4/netfilter/nf_nat_amanda.c b/net/ipv4/netfilter/nf_nat_amanda.c
index 0f17098917b..bd93a1d7105 100644
--- a/net/ipv4/netfilter/nf_nat_amanda.c
+++ b/net/ipv4/netfilter/nf_nat_amanda.c
@@ -45,7 +45,7 @@ static unsigned int help(struct sk_buff **pskb,
45 /* Try to get same port: if not, try to change it. */ 45 /* Try to get same port: if not, try to change it. */
46 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { 46 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
47 exp->tuple.dst.u.tcp.port = htons(port); 47 exp->tuple.dst.u.tcp.port = htons(port);
48 if (nf_conntrack_expect_related(exp) == 0) 48 if (nf_ct_expect_related(exp) == 0)
49 break; 49 break;
50 } 50 }
51 51
@@ -57,7 +57,7 @@ static unsigned int help(struct sk_buff **pskb,
57 matchoff, matchlen, 57 matchoff, matchlen,
58 buffer, strlen(buffer)); 58 buffer, strlen(buffer));
59 if (ret != NF_ACCEPT) 59 if (ret != NF_ACCEPT)
60 nf_conntrack_unexpect_related(exp); 60 nf_ct_unexpect_related(exp);
61 return ret; 61 return ret;
62} 62}
63 63
diff --git a/net/ipv4/netfilter/nf_nat_ftp.c b/net/ipv4/netfilter/nf_nat_ftp.c
index e6bc8e5a72f..cae4b460aee 100644
--- a/net/ipv4/netfilter/nf_nat_ftp.c
+++ b/net/ipv4/netfilter/nf_nat_ftp.c
@@ -131,7 +131,7 @@ static unsigned int nf_nat_ftp(struct sk_buff **pskb,
131 /* Try to get same port: if not, try to change it. */ 131 /* Try to get same port: if not, try to change it. */
132 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { 132 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
133 exp->tuple.dst.u.tcp.port = htons(port); 133 exp->tuple.dst.u.tcp.port = htons(port);
134 if (nf_conntrack_expect_related(exp) == 0) 134 if (nf_ct_expect_related(exp) == 0)
135 break; 135 break;
136 } 136 }
137 137
@@ -139,7 +139,7 @@ static unsigned int nf_nat_ftp(struct sk_buff **pskb,
139 return NF_DROP; 139 return NF_DROP;
140 140
141 if (!mangle[type](pskb, newip, port, matchoff, matchlen, ct, ctinfo)) { 141 if (!mangle[type](pskb, newip, port, matchoff, matchlen, ct, ctinfo)) {
142 nf_conntrack_unexpect_related(exp); 142 nf_ct_unexpect_related(exp);
143 return NF_DROP; 143 return NF_DROP;
144 } 144 }
145 return NF_ACCEPT; 145 return NF_ACCEPT;
diff --git a/net/ipv4/netfilter/nf_nat_h323.c b/net/ipv4/netfilter/nf_nat_h323.c
index c5d2a2d690b..3d760dd657c 100644
--- a/net/ipv4/netfilter/nf_nat_h323.c
+++ b/net/ipv4/netfilter/nf_nat_h323.c
@@ -237,12 +237,12 @@ static int nat_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct,
237 for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port); 237 for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port);
238 nated_port != 0; nated_port += 2) { 238 nated_port != 0; nated_port += 2) {
239 rtp_exp->tuple.dst.u.udp.port = htons(nated_port); 239 rtp_exp->tuple.dst.u.udp.port = htons(nated_port);
240 if (nf_conntrack_expect_related(rtp_exp) == 0) { 240 if (nf_ct_expect_related(rtp_exp) == 0) {
241 rtcp_exp->tuple.dst.u.udp.port = 241 rtcp_exp->tuple.dst.u.udp.port =
242 htons(nated_port + 1); 242 htons(nated_port + 1);
243 if (nf_conntrack_expect_related(rtcp_exp) == 0) 243 if (nf_ct_expect_related(rtcp_exp) == 0)
244 break; 244 break;
245 nf_conntrack_unexpect_related(rtp_exp); 245 nf_ct_unexpect_related(rtp_exp);
246 } 246 }
247 } 247 }
248 248
@@ -261,8 +261,8 @@ static int nat_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct,
261 info->rtp_port[i][dir] = rtp_port; 261 info->rtp_port[i][dir] = rtp_port;
262 info->rtp_port[i][!dir] = htons(nated_port); 262 info->rtp_port[i][!dir] = htons(nated_port);
263 } else { 263 } else {
264 nf_conntrack_unexpect_related(rtp_exp); 264 nf_ct_unexpect_related(rtp_exp);
265 nf_conntrack_unexpect_related(rtcp_exp); 265 nf_ct_unexpect_related(rtcp_exp);
266 return -1; 266 return -1;
267 } 267 }
268 268
@@ -299,7 +299,7 @@ static int nat_t120(struct sk_buff **pskb, struct nf_conn *ct,
299 /* Try to get same port: if not, try to change it. */ 299 /* Try to get same port: if not, try to change it. */
300 for (; nated_port != 0; nated_port++) { 300 for (; nated_port != 0; nated_port++) {
301 exp->tuple.dst.u.tcp.port = htons(nated_port); 301 exp->tuple.dst.u.tcp.port = htons(nated_port);
302 if (nf_conntrack_expect_related(exp) == 0) 302 if (nf_ct_expect_related(exp) == 0)
303 break; 303 break;
304 } 304 }
305 305
@@ -313,7 +313,7 @@ static int nat_t120(struct sk_buff **pskb, struct nf_conn *ct,
313 if (set_h245_addr(pskb, data, dataoff, taddr, 313 if (set_h245_addr(pskb, data, dataoff, taddr,
314 &ct->tuplehash[!dir].tuple.dst.u3, 314 &ct->tuplehash[!dir].tuple.dst.u3,
315 htons(nated_port)) < 0) { 315 htons(nated_port)) < 0) {
316 nf_conntrack_unexpect_related(exp); 316 nf_ct_unexpect_related(exp);
317 return -1; 317 return -1;
318 } 318 }
319 319
@@ -347,7 +347,7 @@ static int nat_h245(struct sk_buff **pskb, struct nf_conn *ct,
347 /* Try to get same port: if not, try to change it. */ 347 /* Try to get same port: if not, try to change it. */
348 for (; nated_port != 0; nated_port++) { 348 for (; nated_port != 0; nated_port++) {
349 exp->tuple.dst.u.tcp.port = htons(nated_port); 349 exp->tuple.dst.u.tcp.port = htons(nated_port);
350 if (nf_conntrack_expect_related(exp) == 0) 350 if (nf_ct_expect_related(exp) == 0)
351 break; 351 break;
352 } 352 }
353 353
@@ -365,7 +365,7 @@ static int nat_h245(struct sk_buff **pskb, struct nf_conn *ct,
365 info->sig_port[dir] = port; 365 info->sig_port[dir] = port;
366 info->sig_port[!dir] = htons(nated_port); 366 info->sig_port[!dir] = htons(nated_port);
367 } else { 367 } else {
368 nf_conntrack_unexpect_related(exp); 368 nf_ct_unexpect_related(exp);
369 return -1; 369 return -1;
370 } 370 }
371 371
@@ -433,7 +433,7 @@ static int nat_q931(struct sk_buff **pskb, struct nf_conn *ct,
433 /* Try to get same port: if not, try to change it. */ 433 /* Try to get same port: if not, try to change it. */
434 for (; nated_port != 0; nated_port++) { 434 for (; nated_port != 0; nated_port++) {
435 exp->tuple.dst.u.tcp.port = htons(nated_port); 435 exp->tuple.dst.u.tcp.port = htons(nated_port);
436 if (nf_conntrack_expect_related(exp) == 0) 436 if (nf_ct_expect_related(exp) == 0)
437 break; 437 break;
438 } 438 }
439 439
@@ -460,7 +460,7 @@ static int nat_q931(struct sk_buff **pskb, struct nf_conn *ct,
460 info->sig_port[!dir]); 460 info->sig_port[!dir]);
461 } 461 }
462 } else { 462 } else {
463 nf_conntrack_unexpect_related(exp); 463 nf_ct_unexpect_related(exp);
464 return -1; 464 return -1;
465 } 465 }
466 466
@@ -517,7 +517,7 @@ static int nat_callforwarding(struct sk_buff **pskb, struct nf_conn *ct,
517 /* Try to get same port: if not, try to change it. */ 517 /* Try to get same port: if not, try to change it. */
518 for (nated_port = ntohs(port); nated_port != 0; nated_port++) { 518 for (nated_port = ntohs(port); nated_port != 0; nated_port++) {
519 exp->tuple.dst.u.tcp.port = htons(nated_port); 519 exp->tuple.dst.u.tcp.port = htons(nated_port);
520 if (nf_conntrack_expect_related(exp) == 0) 520 if (nf_ct_expect_related(exp) == 0)
521 break; 521 break;
522 } 522 }
523 523
@@ -531,7 +531,7 @@ static int nat_callforwarding(struct sk_buff **pskb, struct nf_conn *ct,
531 if (!set_h225_addr(pskb, data, dataoff, taddr, 531 if (!set_h225_addr(pskb, data, dataoff, taddr,
532 &ct->tuplehash[!dir].tuple.dst.u3, 532 &ct->tuplehash[!dir].tuple.dst.u3,
533 htons(nated_port)) == 0) { 533 htons(nated_port)) == 0) {
534 nf_conntrack_unexpect_related(exp); 534 nf_ct_unexpect_related(exp);
535 return -1; 535 return -1;
536 } 536 }
537 537
diff --git a/net/ipv4/netfilter/nf_nat_irc.c b/net/ipv4/netfilter/nf_nat_irc.c
index 9b8c0daea74..db7fbf66fec 100644
--- a/net/ipv4/netfilter/nf_nat_irc.c
+++ b/net/ipv4/netfilter/nf_nat_irc.c
@@ -55,7 +55,7 @@ static unsigned int help(struct sk_buff **pskb,
55 /* Try to get same port: if not, try to change it. */ 55 /* Try to get same port: if not, try to change it. */
56 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { 56 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
57 exp->tuple.dst.u.tcp.port = htons(port); 57 exp->tuple.dst.u.tcp.port = htons(port);
58 if (nf_conntrack_expect_related(exp) == 0) 58 if (nf_ct_expect_related(exp) == 0)
59 break; 59 break;
60 } 60 }
61 61
@@ -71,7 +71,7 @@ static unsigned int help(struct sk_buff **pskb,
71 matchoff, matchlen, buffer, 71 matchoff, matchlen, buffer,
72 strlen(buffer)); 72 strlen(buffer));
73 if (ret != NF_ACCEPT) 73 if (ret != NF_ACCEPT)
74 nf_conntrack_unexpect_related(exp); 74 nf_ct_unexpect_related(exp);
75 return ret; 75 return ret;
76} 76}
77 77
diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c
index a66888749ce..deb80ae2831 100644
--- a/net/ipv4/netfilter/nf_nat_pptp.c
+++ b/net/ipv4/netfilter/nf_nat_pptp.c
@@ -81,10 +81,10 @@ static void pptp_nat_expected(struct nf_conn *ct,
81 81
82 DEBUGP("trying to unexpect other dir: "); 82 DEBUGP("trying to unexpect other dir: ");
83 NF_CT_DUMP_TUPLE(&t); 83 NF_CT_DUMP_TUPLE(&t);
84 other_exp = nf_conntrack_expect_find_get(&t); 84 other_exp = nf_ct_expect_find_get(&t);
85 if (other_exp) { 85 if (other_exp) {
86 nf_conntrack_unexpect_related(other_exp); 86 nf_ct_unexpect_related(other_exp);
87 nf_conntrack_expect_put(other_exp); 87 nf_ct_expect_put(other_exp);
88 DEBUGP("success\n"); 88 DEBUGP("success\n");
89 } else { 89 } else {
90 DEBUGP("not found!\n"); 90 DEBUGP("not found!\n");
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index a32d746c459..940cdfc429d 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -278,7 +278,7 @@ static unsigned int ip_nat_sdp(struct sk_buff **pskb,
278 /* Try to get same port: if not, try to change it. */ 278 /* Try to get same port: if not, try to change it. */
279 for (port = ntohs(exp->saved_proto.udp.port); port != 0; port++) { 279 for (port = ntohs(exp->saved_proto.udp.port); port != 0; port++) {
280 exp->tuple.dst.u.udp.port = htons(port); 280 exp->tuple.dst.u.udp.port = htons(port);
281 if (nf_conntrack_expect_related(exp) == 0) 281 if (nf_ct_expect_related(exp) == 0)
282 break; 282 break;
283 } 283 }
284 284
@@ -286,7 +286,7 @@ static unsigned int ip_nat_sdp(struct sk_buff **pskb,
286 return NF_DROP; 286 return NF_DROP;
287 287
288 if (!mangle_sdp(pskb, ctinfo, ct, newip, port, dptr)) { 288 if (!mangle_sdp(pskb, ctinfo, ct, newip, port, dptr)) {
289 nf_conntrack_unexpect_related(exp); 289 nf_ct_unexpect_related(exp);
290 return NF_DROP; 290 return NF_DROP;
291 } 291 }
292 return NF_ACCEPT; 292 return NF_ACCEPT;
diff --git a/net/ipv4/netfilter/nf_nat_tftp.c b/net/ipv4/netfilter/nf_nat_tftp.c
index 2566b79de22..04dfeaefec0 100644
--- a/net/ipv4/netfilter/nf_nat_tftp.c
+++ b/net/ipv4/netfilter/nf_nat_tftp.c
@@ -30,7 +30,7 @@ static unsigned int help(struct sk_buff **pskb,
30 = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port; 30 = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port;
31 exp->dir = IP_CT_DIR_REPLY; 31 exp->dir = IP_CT_DIR_REPLY;
32 exp->expectfn = nf_nat_follow_master; 32 exp->expectfn = nf_nat_follow_master;
33 if (nf_conntrack_expect_related(exp) != 0) 33 if (nf_ct_expect_related(exp) != 0)
34 return NF_DROP; 34 return NF_DROP;
35 return NF_ACCEPT; 35 return NF_ACCEPT;
36} 36}