summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorTom Herbert2015-08-17 22:42:25 +0200
committerDavid S. Miller2015-08-18 06:33:06 +0200
commit4b048d6d9d0b0b90e1e94f2393796bbf1fa8df4e (patch)
tree0e94118e10507b79263054ac47b1166e8a4be220 /net/sched
parentlwt: Add support to redirect dst.input (diff)
downloadkernel-qcow2-linux-4b048d6d9d0b0b90e1e94f2393796bbf1fa8df4e.tar.gz
kernel-qcow2-linux-4b048d6d9d0b0b90e1e94f2393796bbf1fa8df4e.tar.xz
kernel-qcow2-linux-4b048d6d9d0b0b90e1e94f2393796bbf1fa8df4e.zip
net: Change pseudohdr argument of inet_proto_csum_replace* to be a bool
inet_proto_csum_replace4,2,16 take a pseudohdr argument which indicates the checksum field carries a pseudo header. This argument should be a boolean instead of an int. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_nat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 5be0b3c1c5b0..b7c4ead8b5a8 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -162,7 +162,8 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
goto drop;
tcph = (void *)(skb_network_header(skb) + ihl);
- inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1);
+ inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr,
+ true);
break;
}
case IPPROTO_UDP:
@@ -178,7 +179,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
udph = (void *)(skb_network_header(skb) + ihl);
if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) {
inet_proto_csum_replace4(&udph->check, skb, addr,
- new_addr, 1);
+ new_addr, true);
if (!udph->check)
udph->check = CSUM_MANGLED_0;
}
@@ -231,7 +232,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
iph->saddr = new_addr;
inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
- 0);
+ false);
break;
}
default: