diff options
author | Patrick McHardy <kaber@trash.net> | 2007-11-29 09:17:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:55:15 -0500 |
commit | be0ea7d5da3d99140bde7e5cea328eb111731700 (patch) | |
tree | fc7e0702bf03eff7409c1bd8361fca5737cbe365 /net/sched | |
parent | a99a00cf1adef2d3dce745c93c9cc8b0a1612c50 (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')
-rw-r--r-- | net/sched/Kconfig | 1 | ||||
-rw-r--r-- | net/sched/act_nat.c | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 9c15c4888d12..f5ab54b1edd3 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig | |||
@@ -445,7 +445,6 @@ config NET_ACT_IPT | |||
445 | config NET_ACT_NAT | 445 | config NET_ACT_NAT |
446 | tristate "Stateless NAT" | 446 | tristate "Stateless NAT" |
447 | depends on NET_CLS_ACT | 447 | depends on NET_CLS_ACT |
448 | select NETFILTER | ||
449 | ---help--- | 448 | ---help--- |
450 | Say Y here to do stateless NAT on IPv4 packets. You should use | 449 | Say Y here to do stateless NAT on IPv4 packets. You should use |
451 | netfilter for NAT unless you know what you are doing. | 450 | netfilter for NAT unless you know what you are doing. |
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: |