mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:23:41 +00:00
Merge pull request #4362 from donaldsharp/more_more_less
bgpd: Routemap processing was testing for an impossible flag
This commit is contained in:
commit
a6002ca584
@ -3090,8 +3090,6 @@ static void bgp_route_map_process_peer(const char *rmap_name,
|
|||||||
struct route_map *map, struct peer *peer,
|
struct route_map *map, struct peer *peer,
|
||||||
int afi, int safi, int route_update)
|
int afi, int safi, int route_update)
|
||||||
{
|
{
|
||||||
|
|
||||||
int update;
|
|
||||||
struct bgp_filter *filter;
|
struct bgp_filter *filter;
|
||||||
|
|
||||||
if (!peer || !rmap_name)
|
if (!peer || !rmap_name)
|
||||||
@ -3102,52 +3100,16 @@ static void bgp_route_map_process_peer(const char *rmap_name,
|
|||||||
* in is for non-route-server clients,
|
* in is for non-route-server clients,
|
||||||
* out is for all peers
|
* out is for all peers
|
||||||
*/
|
*/
|
||||||
if (!CHECK_FLAG(peer->flags, PEER_FLAG_RSERVER_CLIENT)) {
|
if (filter->map[RMAP_IN].name
|
||||||
if (filter->map[RMAP_IN].name
|
&& (strcmp(rmap_name, filter->map[RMAP_IN].name) == 0)) {
|
||||||
&& (strcmp(rmap_name, filter->map[RMAP_IN].name) == 0)) {
|
filter->map[RMAP_IN].map = map;
|
||||||
filter->map[RMAP_IN].map = map;
|
|
||||||
|
|
||||||
if (route_update && peer->status == Established) {
|
if (route_update && peer->status == Established) {
|
||||||
if (CHECK_FLAG(peer->af_flags[afi][safi],
|
|
||||||
PEER_FLAG_SOFT_RECONFIG)) {
|
|
||||||
if (bgp_debug_update(peer, NULL, NULL,
|
|
||||||
1))
|
|
||||||
zlog_debug(
|
|
||||||
"Processing route_map %s update on "
|
|
||||||
"peer %s (inbound, soft-reconfig)",
|
|
||||||
rmap_name, peer->host);
|
|
||||||
|
|
||||||
bgp_soft_reconfig_in(peer, afi, safi);
|
|
||||||
} else if (
|
|
||||||
CHECK_FLAG(peer->cap,
|
|
||||||
PEER_CAP_REFRESH_OLD_RCV)
|
|
||||||
|| CHECK_FLAG(
|
|
||||||
peer->cap,
|
|
||||||
PEER_CAP_REFRESH_NEW_RCV)) {
|
|
||||||
|
|
||||||
if (bgp_debug_update(peer, NULL, NULL,
|
|
||||||
1))
|
|
||||||
zlog_debug(
|
|
||||||
"Processing route_map %s update on "
|
|
||||||
"peer %s (inbound, route-refresh)",
|
|
||||||
rmap_name, peer->host);
|
|
||||||
bgp_route_refresh_send(peer, afi, safi,
|
|
||||||
0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CHECK_FLAG(peer->flags, PEER_FLAG_RSERVER_CLIENT)) {
|
|
||||||
update = 0;
|
|
||||||
|
|
||||||
if (update && route_update && peer->status == Established) {
|
|
||||||
if (CHECK_FLAG(peer->af_flags[afi][safi],
|
if (CHECK_FLAG(peer->af_flags[afi][safi],
|
||||||
PEER_FLAG_SOFT_RECONFIG)) {
|
PEER_FLAG_SOFT_RECONFIG)) {
|
||||||
if (bgp_debug_update(peer, NULL, NULL, 1))
|
if (bgp_debug_update(peer, NULL, NULL, 1))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Processing route_map %s update on "
|
"Processing route_map %s update on peer %s (inbound, soft-reconfig)",
|
||||||
"peer %s (import, soft-reconfig)",
|
|
||||||
rmap_name, peer->host);
|
rmap_name, peer->host);
|
||||||
|
|
||||||
bgp_soft_reconfig_in(peer, afi, safi);
|
bgp_soft_reconfig_in(peer, afi, safi);
|
||||||
@ -3157,13 +3119,11 @@ static void bgp_route_map_process_peer(const char *rmap_name,
|
|||||||
PEER_CAP_REFRESH_NEW_RCV)) {
|
PEER_CAP_REFRESH_NEW_RCV)) {
|
||||||
if (bgp_debug_update(peer, NULL, NULL, 1))
|
if (bgp_debug_update(peer, NULL, NULL, 1))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Processing route_map %s update on "
|
"Processing route_map %s update on peer %s (inbound, route-refresh)",
|
||||||
"peer %s (import, route-refresh)",
|
|
||||||
rmap_name, peer->host);
|
rmap_name, peer->host);
|
||||||
bgp_route_refresh_send(peer, afi, safi, 0, 0,
|
bgp_route_refresh_send(peer, afi, safi, 0, 0,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
/* DD: Else, what else do we do ? Reset peer ? */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user