From 92d483fc95eecb7b9b2f7698a049b541d59c72af Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 28 May 2026 11:58:07 +0300 Subject: [PATCH] bgpd: Skip route-map LPM optimisation for AF_FLOWSPEC Reported-by: Qifan Zhang, Palo Alto Networks Signed-off-by: Donatas Abraitis (cherry picked from commit 6038df7229fb436143edc24d19c336f6bd5d1d44) # Conflicts: # lib/routemap.c --- lib/routemap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/routemap.c b/lib/routemap.c index 5bf646221311..3132204cb7a9 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -2569,7 +2569,18 @@ route_map_result_t route_map_apply_ext(struct route_map *map, map->applied++; +<<<<<<< HEAD if (prefix->family == AF_EVPN) { +======= + GETRUSAGE(&mbefore); + ibefore = mbefore; + + if (prefix->family != AF_INET && prefix->family != AF_INET6) { + /* LPM tries are IPv4/IPv6-only; non-IP families (AF_EVPN, + * AF_FLOWSPEC, AF_UNSPEC) must walk all clauses or + * IPv4-restricted matches get silently bypassed. + */ +>>>>>>> 6038df722 (bgpd: Skip route-map LPM optimisation for AF_FLOWSPEC) index = map->head; } else { skip_match_clause = true;