]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Fix insonsistencies with default-originate route-map
authorIqra Siddiqui <imujeebsiddi@vmware.com>
Fri, 27 May 2022 15:07:36 +0000 (08:07 -0700)
committerIqra Siddiqui <imujeebsiddi@vmware.com>
Wed, 6 Jul 2022 18:06:49 +0000 (11:06 -0700)
commita633fb579e377fb745d3d59b6158dba9dc784875
tree527eb8c9fa339cf94488772a79ec5f21314d8380
parent42427e3908350f13244f2478635d47002a643094
bgpd: Fix insonsistencies with default-originate route-map

Description:
- When there are multiple policies configured with
  route-map then the first matching policy is not
  getting applied on default route originated with
  default-originate.

- In BGP we first run through the BGP RIB and then
  pass it to the route-map to find if its permit or
  deny. Due to this behaviour the first route in
  BGP RIB that passes the route-map will be applied.

Fix:
- Passing extra parameter to routemap_apply so that
  we can get the preference of the matching policy,
  keep comparing it with the old preference and finally
  consider the policy with less preference.

Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
bgpd/bgp_updgrp_adv.c
lib/routemap.c
lib/routemap.h