mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a99a00cf1a
commit
be0ea7d5da
12 changed files with 40 additions and 45 deletions
|
|
@ -445,7 +445,6 @@ config NET_ACT_IPT
|
|||
config NET_ACT_NAT
|
||||
tristate "Stateless NAT"
|
||||
depends on NET_CLS_ACT
|
||||
select NETFILTER
|
||||
---help---
|
||||
Say Y here to do stateless NAT on IPv4 packets. You should use
|
||||
netfilter for NAT unless you know what you are doing.
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
|
|||
else
|
||||
iph->daddr = new_addr;
|
||||
|
||||
nf_csum_replace4(&iph->check, addr, new_addr);
|
||||
csum_replace4(&iph->check, addr, new_addr);
|
||||
}
|
||||
|
||||
ihl = iph->ihl * 4;
|
||||
|
|
@ -169,7 +169,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
|
|||
goto drop;
|
||||
|
||||
tcph = (void *)(skb_network_header(skb) + ihl);
|
||||
nf_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1);
|
||||
inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1);
|
||||
break;
|
||||
}
|
||||
case IPPROTO_UDP:
|
||||
|
|
@ -184,8 +184,8 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
|
|||
|
||||
udph = (void *)(skb_network_header(skb) + ihl);
|
||||
if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
nf_proto_csum_replace4(&udph->check, skb, addr,
|
||||
new_addr, 1);
|
||||
inet_proto_csum_replace4(&udph->check, skb, addr,
|
||||
new_addr, 1);
|
||||
if (!udph->check)
|
||||
udph->check = CSUM_MANGLED_0;
|
||||
}
|
||||
|
|
@ -232,8 +232,8 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
|
|||
else
|
||||
iph->saddr = new_addr;
|
||||
|
||||
nf_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
|
||||
1);
|
||||
inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
|
||||
1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue