HomeFreeBSD

routing: Fix use-after-free in finalize_nhop

Description

routing: Fix use-after-free in finalize_nhop

FIB_NH_LOG calls the nhop_get_upper_family(nh) to read
nh->nh_priv->nh_upper_family for failure logging.
Call FIB_NH_LOG before freeing nh so failures are logged
without causing a panic.

MFC after: 3 days

Details

Provenance
pouriaAuthored on Apr 14 2026, 9:36 AM
Parents
rG439132310ae1: iflib: drain admin task and fix teardown order on register failure
Branches
Unknown
Tags
Unknown