]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: Check range_blocklist in is_blocklisted(): we actually blocklist ranges
authorGreg Farnum <gfarnum@redhat.com>
Tue, 30 Nov 2021 18:29:46 +0000 (18:29 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 31 May 2022 23:18:17 +0000 (23:18 +0000)
commite8426cce52d590a0d855ab46ca2ac597ac57ea35
tree2080e86ec0602edb2ebaa152f5f28dc878b33c61
parent32029a72debeca7b14862fee1961a983a560d436
osd: Check range_blocklist in is_blocklisted(): we actually blocklist ranges

Carry a parallel map from cidr addresses to a new
range_bits class (stored entirely as ephemeral state) so that we
don't need to re-compute masks and bit mappings too often, and to
separate out the unpleasant ipv6 bit mapping logic. Then check
against those with range_bits::matches() the same way we check
for equality on specific-entity matches. Nice and simple loops!

Fixes: https://tracker.ceph.com/issues/53050
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 3e26209cbc61cb7fbd4e3f310a28c4cd0f6bb287)
src/osd/OSDMap.cc
src/osd/OSDMap.h