HomeFreeBSD

fib_dxr: do not leak memory if FIB constellation hits structural limit

Description

fib_dxr: do not leak memory if FIB constellation hits structural limit

DXR lookup table encoding has an inherent structural limit on the amount
of binary search ranges it can accomodate. With the current IPv4 BGP views
(circa 1 M prefixes) and default DXR encoding we are only at around 5% of
that limit, so far, far away from hitting it. Just in case it ever gets
hit, make sure we free the allocated structures, instead of leaking it.

MFC after: 1 week

(cherry picked from commit 19bd24caa4c8c76ddf138b3a1598a21c8c5c3291)

Details

Provenance
zecAuthored on May 17 2024, 4:36 PM
Parents
rG9629a4b6865c: fib_dxr: check if cached fib_data matches the new request in dxr_init()
Branches
Unknown
Tags
Unknown