Skip to content

Commit 7e651e4

Browse files
authored
Merge pull request #22083 from opensourcerouting/fix/rmap_flowspec
bgpd: Skip route-map LPM optimisation for AF_FLOWSPEC
2 parents 02c3c84 + 6038df7 commit 7e651e4

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
@@ -2611,7 +2611,11 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
26112611
GETRUSAGE(&mbefore);
26122612
ibefore = mbefore;
26132613

2614-
if (prefix->family == AF_EVPN) {
2614+
if (prefix->family != AF_INET && prefix->family != AF_INET6) {
2615+
/* LPM tries are IPv4/IPv6-only; non-IP families (AF_EVPN,
2616+
* AF_FLOWSPEC, AF_UNSPEC) must walk all clauses or
2617+
* IPv4-restricted matches get silently bypassed.
2618+
*/
26152619
index = map->head;
26162620
} else {
26172621
skip_match_clause = true;

0 commit comments

Comments
 (0)