Routing-policy: Incorrect route advertised to CN/MX if its modified in more than 1 policy
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.0 |
Fix Committed
|
Medium
|
Prakash Bailkeri | |||
Trunk |
Fix Committed
|
Medium
|
Prakash Bailkeri |
Bug Description
Consider 2 routing-policies:
RP-1:
from prefix 8.0.1.0/24 orlonger then add communities 64512:1111, 64512:2222 local-preference 1111 action next
from prefix 8.0.2.0/24 exact then local-preference 1112 med 500 action next
from Protocol service-chain then local-preference 9999 med 8888 action next
from community 35236:400 then remove communities 35236:401 action accept
RP-2:
from community 35236:500 then remove communities 35236:401 local-preference 3131 action accept
from prefix 9.0.2.0/24 exact then local-preference 1010 action default
Policies are applied in the order [RP-1, RP-2].
Consider route:
9.0.2.0/24, communities: [35236:500, 35236:401]
After processing the above route, the route table looks like this:
BGP: LP 9999, 35236: 500, 35236:401 [route sent via BGP to CN/MX. Has changes made by RP-1 but not RP-2]
SC: LP 3131, 35236:500 [This route is correctly updated]
summary: |
- Routing-policy: Incorrect route advertised via BGP if its modified in + Routing-policy: Incorrect route advertised to CN/MX if its modified in more than 1 policy |
Looks like we didn't update our bgp advertisement when the service :RouteReplicate that notifies the route only iff the
chain route was modified via policy. Root cause is a piece of code in
InetVpnTable:
replicated path is the best path.
Fix would be to notify the route if the replicated path was either the
best path earlier or is the new best path now. Or always notify the
route whenever the replicated path changes.
Same change is needed for Inet6VpnTable: :RouteReplicate as well.