diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-31 07:42:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:27:59 -0500 |
commit | c88130bcd546e73e66165f9c29113dae9facf1ec (patch) | |
tree | fd4992c4126c7ad771d297c778ee177f4fb06a72 /net/ipv4 | |
parent | 76eb946040a7b4c797979a9c22464b9a07890ba5 (diff) |
[NETFILTER]: nf_conntrack: naming unification
Rename all "conntrack" variables to "ct" for more consistency and
avoiding some overly long lines.
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_proto_icmp.c | 12 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_proto_gre.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index 4004a04c5510..17217f4f9918 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -100,7 +100,7 @@ static int icmp_packet(struct nf_conn *ct, | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* Called when a new connection for this protocol found. */ | 102 | /* Called when a new connection for this protocol found. */ |
103 | static int icmp_new(struct nf_conn *conntrack, | 103 | static int icmp_new(struct nf_conn *ct, |
104 | const struct sk_buff *skb, unsigned int dataoff) | 104 | const struct sk_buff *skb, unsigned int dataoff) |
105 | { | 105 | { |
106 | static const u_int8_t valid_new[] = { | 106 | static const u_int8_t valid_new[] = { |
@@ -110,15 +110,15 @@ static int icmp_new(struct nf_conn *conntrack, | |||
110 | [ICMP_ADDRESS] = 1 | 110 | [ICMP_ADDRESS] = 1 |
111 | }; | 111 | }; |
112 | 112 | ||
113 | if (conntrack->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new) | 113 | if (ct->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new) |
114 | || !valid_new[conntrack->tuplehash[0].tuple.dst.u.icmp.type]) { | 114 | || !valid_new[ct->tuplehash[0].tuple.dst.u.icmp.type]) { |
115 | /* Can't create a new ICMP `conn' with this. */ | 115 | /* Can't create a new ICMP `conn' with this. */ |
116 | pr_debug("icmp: can't create new conn with type %u\n", | 116 | pr_debug("icmp: can't create new conn with type %u\n", |
117 | conntrack->tuplehash[0].tuple.dst.u.icmp.type); | 117 | ct->tuplehash[0].tuple.dst.u.icmp.type); |
118 | NF_CT_DUMP_TUPLE(&conntrack->tuplehash[0].tuple); | 118 | NF_CT_DUMP_TUPLE(&ct->tuplehash[0].tuple); |
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | atomic_set(&conntrack->proto.icmp.count, 0); | 121 | atomic_set(&ct->proto.icmp.count, 0); |
122 | return 1; | 122 | return 1; |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c index c9dbd550df39..b887ebb42133 100644 --- a/net/ipv4/netfilter/nf_nat_proto_gre.c +++ b/net/ipv4/netfilter/nf_nat_proto_gre.c | |||
@@ -59,7 +59,7 @@ static int | |||
59 | gre_unique_tuple(struct nf_conntrack_tuple *tuple, | 59 | gre_unique_tuple(struct nf_conntrack_tuple *tuple, |
60 | const struct nf_nat_range *range, | 60 | const struct nf_nat_range *range, |
61 | enum nf_nat_manip_type maniptype, | 61 | enum nf_nat_manip_type maniptype, |
62 | const struct nf_conn *conntrack) | 62 | const struct nf_conn *ct) |
63 | { | 63 | { |
64 | static u_int16_t key; | 64 | static u_int16_t key; |
65 | __be16 *keyptr; | 65 | __be16 *keyptr; |
@@ -67,7 +67,7 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, | |||
67 | 67 | ||
68 | /* If there is no master conntrack we are not PPTP, | 68 | /* If there is no master conntrack we are not PPTP, |
69 | do not change tuples */ | 69 | do not change tuples */ |
70 | if (!conntrack->master) | 70 | if (!ct->master) |
71 | return 0; | 71 | return 0; |
72 | 72 | ||
73 | if (maniptype == IP_NAT_MANIP_SRC) | 73 | if (maniptype == IP_NAT_MANIP_SRC) |
@@ -76,7 +76,7 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, | |||
76 | keyptr = &tuple->dst.u.gre.key; | 76 | keyptr = &tuple->dst.u.gre.key; |
77 | 77 | ||
78 | if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)) { | 78 | if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)) { |
79 | pr_debug("%p: NATing GRE PPTP\n", conntrack); | 79 | pr_debug("%p: NATing GRE PPTP\n", ct); |
80 | min = 1; | 80 | min = 1; |
81 | range_size = 0xffff; | 81 | range_size = 0xffff; |
82 | } else { | 82 | } else { |
@@ -88,11 +88,11 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, | |||
88 | 88 | ||
89 | for (i = 0; i < range_size; i++, key++) { | 89 | for (i = 0; i < range_size; i++, key++) { |
90 | *keyptr = htons(min + key % range_size); | 90 | *keyptr = htons(min + key % range_size); |
91 | if (!nf_nat_used_tuple(tuple, conntrack)) | 91 | if (!nf_nat_used_tuple(tuple, ct)) |
92 | return 1; | 92 | return 1; |
93 | } | 93 | } |
94 | 94 | ||
95 | pr_debug("%p: no NAT mapping\n", conntrack); | 95 | pr_debug("%p: no NAT mapping\n", ct); |
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||