History

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec

Steffen Klassert says: ==================== pull request (net): ipsec 2022-07-20 1) Fix a policy refcount imbalance in xfrm_bundle_lookup. From Hangyu Hua. 2) Fix some clang -Wformat warnings. Justin Stitt ====================

David S. Miller committed 4 years ago

Commit ef562172 parents 48ea8ea e79b9473 files · +6 −3Browse files

Unified · Split

3 files
  1. net/ipv4/ah4.c +1 −1
  2. net/ipv4/esp4.c +1 −1
  3. net/xfrm/xfrm_policy.c +4 −1
net/ipv4/ah4.c+1−1
@@ -507,7 +507,7 @@ static int ah_init_state(struct xfrm_state *x) · 506 unmodified lines
507 507
508 if (aalg_desc->uinfo.auth.icv_fullbits/8 !=508 if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
509 crypto_ahash_digestsize(ahash)) {509 crypto_ahash_digestsize(ahash)) {
510 pr_info("%s: %s digestsize %u != %hu\n",510 pr_info("%s: %s digestsize %u != %u\n",
511 __func__, x->aalg->alg_name,511 __func__, x->aalg->alg_name,
512 crypto_ahash_digestsize(ahash),512 crypto_ahash_digestsize(ahash),
513 aalg_desc->uinfo.auth.icv_fullbits / 8);513 aalg_desc->uinfo.auth.icv_fullbits / 8);
net/ipv4/esp4.c+1−1
@@ -1108,7 +1108,7 @@ static int esp_init_authenc(struct xfrm_state *x) · 1107 unmodified lines
1108 err = -EINVAL;1108 err = -EINVAL;
1109 if (aalg_desc->uinfo.auth.icv_fullbits / 8 !=1109 if (aalg_desc->uinfo.auth.icv_fullbits / 8 !=
1110 crypto_aead_authsize(aead)) {1110 crypto_aead_authsize(aead)) {
1111 pr_info("ESP: %s digestsize %u != %hu\n",1111 pr_info("ESP: %s digestsize %u != %u\n",
1112 x->aalg->alg_name,1112 x->aalg->alg_name,
1113 crypto_aead_authsize(aead),1113 crypto_aead_authsize(aead),
1114 aalg_desc->uinfo.auth.icv_fullbits / 8);1114 aalg_desc->uinfo.auth.icv_fullbits / 8);
net/xfrm/xfrm_policy.c+4−1
@@ -2678,8 +2678,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 2677 unmodified lines
2678 *num_xfrms = 0;2678 *num_xfrms = 0;
2679 return 0;2679 return 0;
2680 }2680 }
2681 if (IS_ERR(pols[0]))2681 if (IS_ERR(pols[0])) {
2682 *num_pols = 0;
2682 return PTR_ERR(pols[0]);2683 return PTR_ERR(pols[0]);
2684 }
2683 2685
2684 *num_xfrms = pols[0]->xfrm_nr;2686 *num_xfrms = pols[0]->xfrm_nr;
2685 2687
@@ -2694,6 +2696,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, · 8 unmodified lines
2694 if (pols[1]) {2696 if (pols[1]) {
2695 if (IS_ERR(pols[1])) {2697 if (IS_ERR(pols[1])) {
2696 xfrm_pols_put(pols, *num_pols);2698 xfrm_pols_put(pols, *num_pols);
2699 *num_pols = 0;
2697 return PTR_ERR(pols[1]);2700 return PTR_ERR(pols[1]);
2698 }2701 }
2699 (*num_pols)++;2702 (*num_pols)++;