aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_TCPMSS.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-30 01:17:11 +1100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:55:15 -0800
commitbe0ea7d5da3d99140bde7e5cea328eb111731700 (patch)
treefc7e0702bf03eff7409c1bd8361fca5737cbe365 /net/netfilter/xt_TCPMSS.c
parenta99a00cf1adef2d3dce745c93c9cc8b0a1612c50 (diff)
downloadkernel_samsung_smdk4412-be0ea7d5da3d99140bde7e5cea328eb111731700.zip
kernel_samsung_smdk4412-be0ea7d5da3d99140bde7e5cea328eb111731700.tar.gz
kernel_samsung_smdk4412-be0ea7d5da3d99140bde7e5cea328eb111731700.tar.bz2
[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/netfilter/xt_TCPMSS.c')
-rw-r--r--net/netfilter/xt_TCPMSS.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index f183c8f..bf6249e 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -95,8 +95,9 @@ tcpmss_mangle_packet(struct sk_buff *skb,
opt[i+2] = (newmss & 0xff00) >> 8;
opt[i+3] = newmss & 0x00ff;
- nf_proto_csum_replace2(&tcph->check, skb,
- htons(oldmss), htons(newmss), 0);
+ inet_proto_csum_replace2(&tcph->check, skb,
+ htons(oldmss), htons(newmss),
+ 0);
return 0;
}
}
@@ -117,19 +118,19 @@ tcpmss_mangle_packet(struct sk_buff *skb,
opt = (u_int8_t *)tcph + sizeof(struct tcphdr);
memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr));
- nf_proto_csum_replace2(&tcph->check, skb,
- htons(tcplen), htons(tcplen + TCPOLEN_MSS), 1);
+ inet_proto_csum_replace2(&tcph->check, skb,
+ htons(tcplen), htons(tcplen + TCPOLEN_MSS), 1);
opt[0] = TCPOPT_MSS;
opt[1] = TCPOLEN_MSS;
opt[2] = (newmss & 0xff00) >> 8;
opt[3] = newmss & 0x00ff;
- nf_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0);
+ inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0);
oldval = ((__be16 *)tcph)[6];
tcph->doff += TCPOLEN_MSS/4;
- nf_proto_csum_replace2(&tcph->check, skb,
- oldval, ((__be16 *)tcph)[6], 0);
+ inet_proto_csum_replace2(&tcph->check, skb,
+ oldval, ((__be16 *)tcph)[6], 0);
return TCPOLEN_MSS;
}
@@ -152,7 +153,7 @@ xt_tcpmss_target4(struct sk_buff *skb,
if (ret > 0) {
iph = ip_hdr(skb);
newlen = htons(ntohs(iph->tot_len) + ret);
- nf_csum_replace2(&iph->check, iph->tot_len, newlen);
+ csum_replace2(&iph->check, iph->tot_len, newlen);
iph->tot_len = newlen;
}
return XT_CONTINUE;