Page MenuHomeFreeBSD

routing: Fix crashes with dpdk_lpm algo.
ClosedPublic

Authored by melifaro on Aug 15 2021, 10:38 PM.
Tags
None
Referenced Files
F122869314: D31546.id93720.diff
Wed, Jul 9, 1:28 AM
F122817953: D31546.id93787.diff
Tue, Jul 8, 1:34 PM
F122807280: D31546.id93845.diff
Tue, Jul 8, 10:58 AM
Unknown Object (File)
Mon, Jul 7, 12:11 PM
Unknown Object (File)
Fri, Jul 4, 11:02 AM
Unknown Object (File)
Sun, Jun 15, 1:32 AM
Unknown Object (File)
Thu, Jun 12, 9:04 PM
Unknown Object (File)
Wed, Jun 11, 7:47 PM
Subscribers

Details

Summary

When a prefix gets deleted from the RIB, dpdk_lpm algo needs to know
the nexthop of the "parent" prefix to update its internal state.
The glue code, which utilises RIB as a backing route store, used
fib4_lookup_rt() after the prefix deletion. This approach didn't
work for "nested prefixes": if 10.0.0.0/24, 10.0.0.0/23 and 10.0.0.0/22
exists in RIB, deleting 10.0.0.0/23 resulted in 10.0.0.0/24 being
returned. This, in turn, resulted in failure to update the entire
/23 with a next nexhop, leading to eventual crashes.

Fix this by creating per-family rt_get_inet[6]_parent() helpers
and using them in the dpdk_lpm code.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41083
Build 37972: arc lint + arc unit