]> git.apps.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:30:20 +0000 (23:30 +0000)
commit7a8e5608f0d009bc3d215e79a2c30fb02b65d00b
tree2571db78390272c8c9b5c3cd14f07f4f4980161e
parent0053fc1bf4a332f559ff85c0e8a0421c163086a2
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