aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_nat.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-29 09:17:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:15 -0500
commitbe0ea7d5da3d99140bde7e5cea328eb111731700 (patch)
treefc7e0702bf03eff7409c1bd8361fca5737cbe365 /net/sched/act_nat.c
parenta99a00cf1adef2d3dce745c93c9cc8b0a1612c50 (diff)
[NETFILTER]: Convert old checksum helper names
Kill the defines again, convert to the new checksum helper names and remove the dependency of NET_ACT_NAT on NETFILTER. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_nat.c')
-rw-r--r--net/sched/act_nat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index c96273bcaf9c..da5c1eae4222 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -151,7 +151,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
151 else 151 else
152 iph->daddr = new_addr; 152 iph->daddr = new_addr;
153 153
154 nf_csum_replace4(&iph->check, addr, new_addr); 154 csum_replace4(&iph->check, addr, new_addr);
155 } 155 }
156 156
157 ihl = iph->ihl * 4; 157 ihl = iph->ihl * 4;
@@ -169,7 +169,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
169 goto drop; 169 goto drop;
170 170
171 tcph = (void *)(skb_network_header(skb) + ihl); 171 tcph = (void *)(skb_network_header(skb) + ihl);
172 nf_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1); 172 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1);
173 break; 173 break;
174 } 174 }
175 case IPPROTO_UDP: 175 case IPPROTO_UDP:
@@ -184,8 +184,8 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
184 184
185 udph = (void *)(skb_network_header(skb) + ihl); 185 udph = (void *)(skb_network_header(skb) + ihl);
186 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { 186 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) {
187 nf_proto_csum_replace4(&udph->check, skb, addr, 187 inet_proto_csum_replace4(&udph->check, skb, addr,
188 new_addr, 1); 188 new_addr, 1);
189 if (!udph->check) 189 if (!udph->check)
190 udph->check = CSUM_MANGLED_0; 190 udph->check = CSUM_MANGLED_0;
191 } 191 }
@@ -232,8 +232,8 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
232 else 232 else
233 iph->saddr = new_addr; 233 iph->saddr = new_addr;
234 234
235 nf_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr, 235 inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
236 1); 236 1);
237 break; 237 break;
238 } 238 }
239 default: 239 default: