mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 08:32:12 +00:00
bgpd: Fallback to destination peer when using match src-peer ...
If using at incoming direction, e.g.: route-map test permit 10 match src-peer 10.0.0.1 ! router bgp 65000 neighbor 10.0.0.1 route-map test in ! Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
791e34258f
commit
f153998874
@ -348,6 +348,15 @@ static enum route_map_cmd_result_t route_match_src_peer(void *rule, const struct
|
|||||||
bpi = object;
|
bpi = object;
|
||||||
peer = bpi->from;
|
peer = bpi->from;
|
||||||
|
|
||||||
|
/* Fallback to destination (current) peer. This is mostly
|
||||||
|
* happens if `match src-peer ...` is used at incoming direction.
|
||||||
|
*/
|
||||||
|
if (!peer)
|
||||||
|
peer = bpi->peer;
|
||||||
|
|
||||||
|
if (!peer)
|
||||||
|
return RMAP_NOMATCH;
|
||||||
|
|
||||||
if (pc->interface) {
|
if (pc->interface) {
|
||||||
if (!peer->conf_if && !peer->group)
|
if (!peer->conf_if && !peer->group)
|
||||||
return RMAP_NOMATCH;
|
return RMAP_NOMATCH;
|
||||||
|
Loading…
Reference in New Issue
Block a user