Skip to content

Commit 90e9ebb

Browse files
ton31337mergify[bot]
authored andcommitted
bgpd: Skip route-map LPM optimisation for AF_FLOWSPEC
Reported-by: Qifan Zhang, Palo Alto Networks Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit 6038df7)
1 parent c02a575 commit 90e9ebb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/routemap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2602,7 +2602,11 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
26022602
GETRUSAGE(&mbefore);
26032603
ibefore = mbefore;
26042604

2605-
if (prefix->family == AF_EVPN) {
2605+
if (prefix->family != AF_INET && prefix->family != AF_INET6) {
2606+
/* LPM tries are IPv4/IPv6-only; non-IP families (AF_EVPN,
2607+
* AF_FLOWSPEC, AF_UNSPEC) must walk all clauses or
2608+
* IPv4-restricted matches get silently bypassed.
2609+
*/
26062610
index = map->head;
26072611
} else {
26082612
skip_match_clause = true;

0 commit comments

Comments
 (0)