If we have (default enabled) enabled `bgp ebgp-require-policy`, then first check
it before applying the route-maps.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
If we receive an IPv6 prefix e.g.: 2001:db8:100::/64 with nextop: 0.0.0.0, and
mp_nexthop: fc00::2, we should not treat this with an invalid nexthop because
of 0.0.0.0. We MUST check for MP_REACH attribute also and decide later if we
have at least one a valid nexthop.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
In cases such as 'no advertise-all-vni' and L2 VNI DELETE, we need to
pop all the VPN routes present in the bgp_zebra_announce FIFO yet to
be processed regardless of VNI is configured or not.
NOTE: NO need to pop the VPN routes in two cases
1) In free_vni_entry
- Called by bgp_free()->bgp_evpn_cleanup().
- Since bgp_delete is called before bgp_free and we pop all the dest
pertaining to bgp under delete.
2) evpn_delete_vni() when user configures "no vni" since the withdraw
of all routes happen in normal cycle.
Fixes: a07df6f754
("bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation")
Ticket :#4163611
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
as is not initialized and it's assigned only later.
CID: 1601739
Fixes: 937cf4d ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Signalize termination to functions so they can avoid accessing pointers
that might be no longer available.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
When a multicast route is created with embedded RP the channel oil
never gets decremented when `clear ipv6 mroute` is called.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Test embedded RP features:
- Embedded RP itself
- Embedded RP group list filtering
- Embedded RP limit
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Implement embedded RP support and configuration commands.
Embedded RP is disabled by default and can be globally enabled with the
command `embedded-rp` in the PIMv6 configuration node.
It supports the following options:
- Embedded RP maximum limit
- Embedded RP group filtering
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Without the patch only the best path is displayed.
With the patch, display all paths including addpaths, but only for non-JSON
output to avoid breaking existing output.
E.g.:
```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
Network Next Hop Metric LocPrf Weight Path
*> 172.16.16.254/32 192.168.2.3 0 0 65003 ?
* 172.16.16.254/32 192.168.2.4 0 0 65004 ?
*> 192.168.2.0/24 192.168.2.3 0 0 65003 ?
* 192.168.2.0/24 192.168.2.4 0 0 65004 ?
```
Before it was:
```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
Network Next Hop Metric LocPrf Weight Path
*> 172.16.16.254/32 192.168.2.3 0 0 65003 ?
*> 192.168.2.0/24 192.168.2.3 0 0 65003 ?
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
CID: 1601739
Fixes: 937cf4db17 ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>