]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
rlm_kafka: unbox async opaques with talloc_get_type_abort
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 22 Apr 2026 16:38:33 +0000 (12:38 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 22 Apr 2026 16:38:33 +0000 (12:38 -0400)
commitcb2ee227c3f8ccf99f25835571a31b4b8a068ec1
tree75ce045ea174c5ebddc5b4e050692174078b834b
parent57da650fa35a1278353d0b5fcfe93816b0ef57ea
rlm_kafka: unbox async opaques with talloc_get_type_abort

xctx->inst / xctx->thread / msg->_private are all void pointers that
we know at the call-site should point back at our typed talloc chunks.
Using talloc_get_type_abort turns a subtle type-system hole into a
loud abort at the exact callsite if the opaque ever gets crossed over,
instead of a mystery crash deep in the function body.

The DR callback keeps its NULL-guard first - a NULL opaque is the
documented signal for fire-and-forget produces, so it's part of the
contract, not an error worth asserting on.
src/modules/rlm_kafka/rlm_kafka.c