if (BGP_DEBUG(update, UPDATE_OUT))
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));
addpath_capable = bgp_addpath_encode_tx(peer, afi, safi);
* on same peer, routes in advertise-map may not
* be advertised as expected.
*/
- if (update_type == ADVERTISE &&
+ if (update_type == UPDATE_TYPE_ADVERTISE &&
subgroup_announce_check(dest, pi, subgrp, dest_p,
&attr, &advmap_attr)) {
bgp_adj_out_set_subgroup(dest, subgrp, &attr,
*/
if (filter->advmap.condition == CONDITION_EXIST)
filter->advmap.update_type =
- (ret == RMAP_PERMITMATCH) ? ADVERTISE
- : WITHDRAW;
+ (ret == RMAP_PERMITMATCH)
+ ? UPDATE_TYPE_ADVERTISE
+ : UPDATE_TYPE_WITHDRAW;
else
filter->advmap.update_type =
- (ret == RMAP_PERMITMATCH) ? WITHDRAW
- : ADVERTISE;
+ (ret == RMAP_PERMITMATCH)
+ ? UPDATE_TYPE_WITHDRAW
+ : UPDATE_TYPE_ADVERTISE;
/*
* Update condadv update type so
filter->advmap.cname);
json_object_string_add(json_advmap, "advertiseMap",
filter->advmap.aname);
- json_object_string_add(json_advmap, "advertiseStatus",
- filter->advmap.update_type
- == ADVERTISE
- ? "Advertise"
- : "Withdraw");
+ json_object_string_add(
+ json_advmap, "advertiseStatus",
+ filter->advmap.update_type ==
+ UPDATE_TYPE_ADVERTISE
+ ? "Advertise"
+ : "Withdraw");
json_object_object_add(json_addr, "advertiseMap",
json_advmap);
}
filter->advmap.cname,
filter->advmap.amap ? "*" : "",
filter->advmap.aname,
- filter->advmap.update_type == ADVERTISE
+ filter->advmap.update_type ==
+ UPDATE_TYPE_ADVERTISE
? "Advertise"
: "Withdraw");
/* Increment condition_filter_count and/or create timer. */
if (!filter_exists) {
- filter->advmap.update_type = ADVERTISE;
+ filter->advmap.update_type = UPDATE_TYPE_ADVERTISE;
bgp_conditional_adv_enable(peer, afi, safi);
}
}
#define CONDITION_NON_EXIST false
#define CONDITION_EXIST true
-enum update_type { WITHDRAW, ADVERTISE };
+enum update_type { UPDATE_TYPE_WITHDRAW, UPDATE_TYPE_ADVERTISE };
#include "filter.h"