pull request (net-next): ipsec-next 2021-04-14
Subsystems (3)
Steffen Klassert
maintainerNot much this time:
1) Simplification of some variable calculations in esp4 and esp6. From Jiapeng Chong and Junlin Yang.
2) Fix a clang Wformat warning in esp6 and ah6.
From Arnd Bergmann.
Please pull or let me know if there are problems.
Thanks!
The following changes since commit 34bb975126419e86bc3b95e200dc41de6c6ca69c:
net: fddi: skfp: Mundane typo fixes throughout the file smt.h (2021-03-10 15:42:22 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
for you to fetch changes up to 6ad2dd6c14d3989b44cdc17f1e7258bf613dd070:
ipv6: fix clang Wformat warning (2021-03-25 09:48:32 +0100)
----------------------------------------------------------------
Arnd Bergmann (1):
ipv6: fix clang Wformat warning
Jiapeng Chong (1):
esp4: Simplify the calculation of variables
Junlin Yang (1):
esp6: remove a duplicative condition
net/ipv4/esp4.c | 2 +- net/ipv6/ah6.c | 2 +- net/ipv6/esp6.c | 2 +- net/ipv6/esp6_offload.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
Steffen Klassert
maintainerPATCH 2/3 esp6: remove a duplicative condition
From: Junlin Yang <[email protected]>
Fixes coccicheck warnings:
./net/ipv6/esp6_offload.c:319:32-34:
WARNING !A || A && B is equivalent to !A || B
--- net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/esp6_offload.c +1 -1
@@ -316,7 +316,7 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features esp.plen = esp.clen - skb->len - esp.tfclen; esp.tailen = esp.tfclen + esp.plen + alen; -if (!hw_offload || (hw_offload && !skb_is_gso (skb))) { +if (!hw_offload || !skb_is_gso (skb)) { esp.nfrags =esp6_output_head (x, skb, &esp);if (esp.nfrags <0 )return esp.nfrags;
Signature · 1 line
2.25.1
Steffen Klassert
maintainerPATCH 3/3 ipv6: fix clang Wformat warning
In reply to Steffen KlassertFrom: Arnd Bergmann <[email protected]>
When building with 'make W=1', clang warns about a mismatched format string:
net/ipv6/ah6.c:710:4: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
aalg_desc->uinfo.auth.icv_fullbits/8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:375:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
net/ipv6/esp6.c:1153:5: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
aalg_desc->uinfo.auth.icv_fullbits / 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:375:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~Here, the result of dividing a 16-bit number by a 32-bit number produces a 32-bit result, which is printed as a 16-bit integer.
Change the %hu format to the normal %u, which has the same effect but avoids the warning.
--- net/ipv6/ah6.c | 2 +- net/ipv6/esp6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv6/ah6.c +1 -1
@@ -705,7 +705,7 @@ static int ah6_init_state(struct xfrm_state *x)if (aalg_desc->uinfo.auth.icv_fullbits/8 !=crypto_ahash_digestsize (ahash)) { -pr_info ("AH: %s digestsize %u != %hu\n" , +pr_info ("AH: %s digestsize %u != %u\n" , x->aalg->alg_name,crypto_ahash_digestsize (ahash), aalg_desc->uinfo.auth.icv_fullbits/8 ); goto error;
net/ipv6/esp6.c +1 -1
@@ -1147,7 +1147,7 @@ static int esp_init_authenc(struct xfrm_state *x) err = -EINVAL ;if (aalg_desc->uinfo.auth.icv_fullbits /8 !=crypto_aead_authsize (aead)) { -pr_info ("ESP: %s digestsize %u != %hu\n" , +pr_info ("ESP: %s digestsize %u != %u\n" , x->aalg->alg_name,crypto_aead_authsize (aead), aalg_desc->uinfo.auth.icv_fullbits /8 );
Signature · 1 line
2.25.1
Steffen Klassert
maintainerPATCH 1/3 esp4: Simplify the calculation of variables
In reply to Steffen KlassertFrom: Jiapeng Chong <[email protected]>
Fix the following coccicheck warnings:
./net/ipv4/esp4.c:757:16-18: WARNING !A || A && B is equivalent to !A || B.
--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/esp4.c +1 -1
@@ -754,7 +754,7 @@ int esp_input_done2(struct sk_buff *skb, int err)int hlen =sizeof (struct ip_esp_hdr ) +crypto_aead_ivsize (aead);int ihl; -if (!xo || (xo && !(xo->flags &CRYPTO_DONE ))) +if (!xo || !(xo->flags &CRYPTO_DONE ))kfree (ESP_SKB_CB (skb)->tmp);if (unlikely (err))
Signature · 1 line
2.25.1
This pull request was applied to netdev/net-next.git (refs/heads/master):
Hello:
This pull request was applied to netdev/net-next.git (refs/heads/master):
Quoted 9 lines · On Wed, 14 Apr 2021 12:16:58 +0200 you wrote:
Not much this time:
1) Simplification of some variable calculations in esp4 and esp6. From Jiapeng Chong and Junlin Yang.
2) Fix a clang Wformat warning in esp6 and ah6.
From Arnd Bergmann.[...]
Here is the summary with links:
- pull request (net-next): ipsec-next 2021-04-14
https://git.kernel.org/netdev/net-next/c/8c1186be3f1b - [2/3] esp6: remove a duplicative condition https://git.kernel.org/netdev/net-next/c/f076835a8bf2 - [3/3] ipv6: fix clang Wformat warning https://git.kernel.org/netdev/net-next/c/6ad2dd6c14d3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html