diff options
author | Florian Westphal <fw@strlen.de> | 2022-06-23 16:05:10 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-07-11 17:40:45 +0300 |
commit | 168141f7e0b4294f0bb45c10c710e85b812af891 (patch) | |
tree | d591e3595c93b2d729a09d98d9db5a2567074768 /net/netfilter/xt_TCPMSS.c | |
parent | ec6f2ff0a3985907b0c224e482d790615be5772d (diff) | |
download | linux-168141f7e0b4294f0bb45c10c710e85b812af891.tar.xz |
netfilter: x_tables: use correct integer types
Sparse complains because __be32 and u32 are mixed without
conversions. Use the correct types, no code changes.
Furthermore, xt_DSCP generates a bit truncation warning:
"cast truncates bits from constant value (ffffff03 becomes 3)"
The truncation is fine (and wanted). Add a private definition and use that
instead.
objdiff shows no changes.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_TCPMSS.c')
-rw-r--r-- | net/netfilter/xt_TCPMSS.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index 122db9fbb9f4..116a885adb3c 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c @@ -239,8 +239,8 @@ tcpmss_tg6(struct sk_buff *skb, const struct xt_action_param *par) oldlen = ipv6h->payload_len; newlen = htons(ntohs(oldlen) + ret); if (skb->ip_summed == CHECKSUM_COMPLETE) - skb->csum = csum_add(csum_sub(skb->csum, oldlen), - newlen); + skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)oldlen), + (__force __wsum)newlen); ipv6h->payload_len = newlen; } return XT_CONTINUE; |