mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
xfrm: Fix bucket count reported to userspace
[ Upstream commitca92e173ab] sadhcnt is reported by `ip -s xfrm state count` as "buckets count", not the hash mask. Fixes:28d8909bc7("[XFRM]: Export SAD info.") Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
34a2f36c01
commit
00eff089df
@@ -794,7 +794,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user