]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Improve route-map matching for INET(6) AF 2239/head
authorPascal Mathis <mail@pascalmathis.com>
Tue, 15 May 2018 17:22:25 +0000 (19:22 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Tue, 15 May 2018 17:44:06 +0000 (19:44 +0200)
commit09cd98ebeef5e8d0c39a30574307a04bbb59b947
tree93bc89a72356a40cef3fbb0592cdfd3e66e4d9d0
parent05c6f6a3c209ed2d95c0492260171aeeef077f07
bgpd: Improve route-map matching for INET(6) AF

While the current implementation does pay attention to the AF
(inet/inet6) when comparing the IPv4/v6 address against an address-list
/ prefix-list inside a route-map, the AF check is being done rather
late, which leads to CPU cycles being wasted due to unnecessary list
lookups / address matching.

This commit checks the address family of a prefix right inside the
`route_match_ip(v6)_` functions before looking up any address- and/or
prefix-list, which should improve performance.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
bgpd/bgp_routemap.c