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>
This commit is contained in:

committed by
David S. Miller

parent
2536862311
commit
4b048d6d9d
@@ -1349,7 +1349,7 @@ const struct bpf_func_proto bpf_l3_csum_replace_proto = {
|
||||
static u64 bpf_l4_csum_replace(u64 r1, u64 r2, u64 from, u64 to, u64 flags)
|
||||
{
|
||||
struct sk_buff *skb = (struct sk_buff *) (long) r1;
|
||||
u32 is_pseudo = BPF_IS_PSEUDO_HEADER(flags);
|
||||
bool is_pseudo = !!BPF_IS_PSEUDO_HEADER(flags);
|
||||
int offset = (int) r2;
|
||||
__sum16 sum, *ptr;
|
||||
|
||||
|
@@ -301,7 +301,7 @@ out:
|
||||
EXPORT_SYMBOL(in6_pton);
|
||||
|
||||
void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
|
||||
__be32 from, __be32 to, int pseudohdr)
|
||||
__be32 from, __be32 to, bool pseudohdr)
|
||||
{
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL) {
|
||||
csum_replace4(sum, from, to);
|
||||
@@ -318,7 +318,7 @@ EXPORT_SYMBOL(inet_proto_csum_replace4);
|
||||
|
||||
void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb,
|
||||
const __be32 *from, const __be32 *to,
|
||||
int pseudohdr)
|
||||
bool pseudohdr)
|
||||
{
|
||||
__be32 diff[] = {
|
||||
~from[0], ~from[1], ~from[2], ~from[3],
|
||||
|
Reference in New Issue
Block a user