mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 11:25:41 +00:00
bgpd: rename update_type enum values
These values were named WITHDRAW and UPDATE. Yeah, you guessed it, those are already #define's elsewhere (bgp_debug.h). Hilarity ensues. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
This commit is contained in:
parent
820e696f84
commit
ecf2b628d9
@ -100,7 +100,8 @@ static void bgp_conditional_adv_routes(struct peer *peer, afi_t afi,
|
|||||||
|
|
||||||
if (BGP_DEBUG(update, UPDATE_OUT))
|
if (BGP_DEBUG(update, UPDATE_OUT))
|
||||||
zlog_debug("%s: %s routes to/from %s for %s", __func__,
|
zlog_debug("%s: %s routes to/from %s for %s", __func__,
|
||||||
update_type == ADVERTISE ? "Advertise" : "Withdraw",
|
update_type == UPDATE_TYPE_ADVERTISE ? "Advertise"
|
||||||
|
: "Withdraw",
|
||||||
peer->host, get_afi_safi_str(afi, safi, false));
|
peer->host, get_afi_safi_str(afi, safi, false));
|
||||||
|
|
||||||
addpath_capable = bgp_addpath_encode_tx(peer, afi, safi);
|
addpath_capable = bgp_addpath_encode_tx(peer, afi, safi);
|
||||||
@ -133,7 +134,7 @@ static void bgp_conditional_adv_routes(struct peer *peer, afi_t afi,
|
|||||||
* on same peer, routes in advertise-map may not
|
* on same peer, routes in advertise-map may not
|
||||||
* be advertised as expected.
|
* be advertised as expected.
|
||||||
*/
|
*/
|
||||||
if (update_type == ADVERTISE &&
|
if (update_type == UPDATE_TYPE_ADVERTISE &&
|
||||||
subgroup_announce_check(dest, pi, subgrp, dest_p,
|
subgroup_announce_check(dest, pi, subgrp, dest_p,
|
||||||
&attr, &advmap_attr)) {
|
&attr, &advmap_attr)) {
|
||||||
bgp_adj_out_set_subgroup(dest, subgrp, &attr,
|
bgp_adj_out_set_subgroup(dest, subgrp, &attr,
|
||||||
@ -248,12 +249,14 @@ static void bgp_conditional_adv_timer(struct thread *t)
|
|||||||
*/
|
*/
|
||||||
if (filter->advmap.condition == CONDITION_EXIST)
|
if (filter->advmap.condition == CONDITION_EXIST)
|
||||||
filter->advmap.update_type =
|
filter->advmap.update_type =
|
||||||
(ret == RMAP_PERMITMATCH) ? ADVERTISE
|
(ret == RMAP_PERMITMATCH)
|
||||||
: WITHDRAW;
|
? UPDATE_TYPE_ADVERTISE
|
||||||
|
: UPDATE_TYPE_WITHDRAW;
|
||||||
else
|
else
|
||||||
filter->advmap.update_type =
|
filter->advmap.update_type =
|
||||||
(ret == RMAP_PERMITMATCH) ? WITHDRAW
|
(ret == RMAP_PERMITMATCH)
|
||||||
: ADVERTISE;
|
? UPDATE_TYPE_WITHDRAW
|
||||||
|
: UPDATE_TYPE_ADVERTISE;
|
||||||
|
|
||||||
/* Send regular update as per the existing policy.
|
/* Send regular update as per the existing policy.
|
||||||
* There is a change in route-map, match-rule, ACLs,
|
* There is a change in route-map, match-rule, ACLs,
|
||||||
|
@ -12115,11 +12115,12 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
|
|||||||
filter->advmap.cname);
|
filter->advmap.cname);
|
||||||
json_object_string_add(json_advmap, "advertiseMap",
|
json_object_string_add(json_advmap, "advertiseMap",
|
||||||
filter->advmap.aname);
|
filter->advmap.aname);
|
||||||
json_object_string_add(json_advmap, "advertiseStatus",
|
json_object_string_add(
|
||||||
filter->advmap.update_type
|
json_advmap, "advertiseStatus",
|
||||||
== ADVERTISE
|
filter->advmap.update_type ==
|
||||||
? "Advertise"
|
UPDATE_TYPE_ADVERTISE
|
||||||
: "Withdraw");
|
? "Advertise"
|
||||||
|
: "Withdraw");
|
||||||
json_object_object_add(json_addr, "advertiseMap",
|
json_object_object_add(json_addr, "advertiseMap",
|
||||||
json_advmap);
|
json_advmap);
|
||||||
}
|
}
|
||||||
@ -12429,7 +12430,8 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
|
|||||||
filter->advmap.cname,
|
filter->advmap.cname,
|
||||||
filter->advmap.amap ? "*" : "",
|
filter->advmap.amap ? "*" : "",
|
||||||
filter->advmap.aname,
|
filter->advmap.aname,
|
||||||
filter->advmap.update_type == ADVERTISE
|
filter->advmap.update_type ==
|
||||||
|
UPDATE_TYPE_ADVERTISE
|
||||||
? "Advertise"
|
? "Advertise"
|
||||||
: "Withdraw");
|
: "Withdraw");
|
||||||
|
|
||||||
|
@ -7225,7 +7225,7 @@ static void peer_advertise_map_filter_update(struct peer *peer, afi_t afi,
|
|||||||
|
|
||||||
/* Increment condition_filter_count and/or create timer. */
|
/* Increment condition_filter_count and/or create timer. */
|
||||||
if (!filter_exists) {
|
if (!filter_exists) {
|
||||||
filter->advmap.update_type = ADVERTISE;
|
filter->advmap.update_type = UPDATE_TYPE_ADVERTISE;
|
||||||
bgp_conditional_adv_enable(peer, afi, safi);
|
bgp_conditional_adv_enable(peer, afi, safi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -859,7 +859,7 @@ struct bgp_nexthop {
|
|||||||
#define CONDITION_NON_EXIST false
|
#define CONDITION_NON_EXIST false
|
||||||
#define CONDITION_EXIST true
|
#define CONDITION_EXIST true
|
||||||
|
|
||||||
enum update_type { WITHDRAW, ADVERTISE };
|
enum update_type { UPDATE_TYPE_WITHDRAW, UPDATE_TYPE_ADVERTISE };
|
||||||
|
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user