]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Improve route-map matching for INET(6) AF
authorPascal Mathis <mail@pascalmathis.com>
Tue, 15 May 2018 17:22:25 +0000 (19:22 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Tue, 29 May 2018 18:09:03 +0000 (20:09 +0200)
commitdd92d48d5672e6d70014488dbca29277f0829831
treef87de43b0292d6e8903dd3833172056c77744828
parent7fbf0204d9f86a5fc48f88ab934fff0fa8741d15
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>
(cherry picked from commit 09cd98ebeef5e8d0c39a30574307a04bbb59b947)
bgpd/bgp_routemap.c