]> 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>
Wed, 13 Apr 2022 00:14:16 +0000 (00:14 +0000)
commit3e26209cbc61cb7fbd4e3f310a28c4cd0f6bb287
tree121f775217af4e9b66c3272ecfbef76ce13b2e11
parentdc09905f1e95201ba8257b70c60c9985eee6ffdb
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>
src/osd/OSDMap.cc
src/osd/OSDMap.h