Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFiro Yang <fyang@suse.com>2019-08-16 11:05:25 +0200
committerFiro Yang <fyang@suse.com>2019-08-16 11:05:37 +0200
commit6524e96510a70b1cca634c1cd69fbc095bf64030 (patch)
treebfd960450f182fd49763e95335096738bd54c5a6
parent75645bd87ffb343a88f4f732e2c4f068c97810bb (diff)
xfrm: Fix bucket count reported to userspace (bsc#1143300).
-rw-r--r--net/xfrm/xfrm_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 58c9d4b3fd0c..5bc433d22ad7 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -779,7 +779,7 @@ void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si)
{
spin_lock_bh(&net->xfrm.xfrm_state_lock);
si->sadcnt = net->xfrm.state_num;
- si->sadhcnt = net->xfrm.state_hmask;
+ si->sadhcnt = net->xfrm.state_hmask + 1;
si->sadhmcnt = xfrm_state_hashmax;
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
}