summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2019-07-02 17:51:09 +0200
committerGitHub <noreply@github.com>2019-07-02 17:51:09 +0200
commite846ec980612d32993b70c2bd47fa51e54bb6547 (patch)
tree1f1ffc5838d02c63e0972bbff632cc2b67516827 /pimd
parentMerge pull request #4086 from opensourcerouting/fix-yang-validation (diff)
parent*: s/TRUE/true/, s/FALSE/false/ (diff)
downloadfrr-e846ec980612d32993b70c2bd47fa51e54bb6547.tar.xz
frr-e846ec980612d32993b70c2bd47fa51e54bb6547.zip
Merge pull request #4624 from qlyoung/use-standard-bools
*: s/TRUE/true/, s/FALSE/false/
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_assert.c4
-rw-r--r--pimd/pim_bsm.c8
-rw-r--r--pimd/pim_cmd.c16
-rw-r--r--pimd/pim_iface.c2
-rw-r--r--pimd/pim_ifchannel.c8
-rw-r--r--pimd/pim_macro.c22
-rw-r--r--pimd/pim_register.c12
-rw-r--r--pimd/pim_rpf.c2
-rw-r--r--pimd/pim_upstream.c14
-rw-r--r--pimd/pim_vxlan.c2
10 files changed, 45 insertions, 45 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index 228218e3a..3aa2a9224 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -728,7 +728,7 @@ void assert_action_a5(struct pim_ifchannel *ch)
winner metric as AssertWinnerMetric(S,G,I).
Set Assert Timer to Assert_Time.
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true)
- set SPTbit(S,G) to TRUE.
+ set SPTbit(S,G) to true.
*/
static void assert_action_a6(struct pim_ifchannel *ch,
struct pim_assert_metric winner_metric)
@@ -737,7 +737,7 @@ static void assert_action_a6(struct pim_ifchannel *ch,
/*
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true) set
- SPTbit(S,G) to TRUE.
+ SPTbit(S,G) to true.
*/
if (ch->upstream->rpf.source_nexthop.interface == ch->interface)
if (ch->upstream->join_state == PIM_UPSTREAM_JOINED)
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 9995b5e31..62f13b5b5 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -865,8 +865,8 @@ static void pim_bsm_fwd_whole_sz(struct pim_instance *pim, uint8_t *buf,
struct pim_interface *pim_ifp;
struct in_addr dst_addr;
uint32_t pim_mtu;
- bool no_fwd = FALSE;
- bool ret = FALSE;
+ bool no_fwd = false;
+ bool ret = false;
/* For now only global scope zone is supported, so send on all
* pim interfaces in the vrf
@@ -891,7 +891,7 @@ static void pim_bsm_fwd_whole_sz(struct pim_instance *pim, uint8_t *buf,
if (!pim_bsm_send_intf(buf, len, ifp, dst_addr)) {
if (PIM_DEBUG_BSM)
zlog_debug(
- "%s: pim_bsm_send_intf returned FALSE",
+ "%s: pim_bsm_send_intf returned false",
__PRETTY_FUNCTION__);
}
}
@@ -1216,7 +1216,7 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf,
struct pim_instance *pim;
char bsr_str[INET_ADDRSTRLEN];
uint16_t frag_tag;
- bool empty_bsm = FALSE;
+ bool empty_bsm = false;
/* BSM Packet acceptance validation */
pim_ifp = ifp->info;
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 72d7916b2..6420574e9 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -9843,7 +9843,7 @@ static void pim_show_vxlan_sg_entry(struct pim_vxlan_sg *vxlan_sg,
char src_str[INET_ADDRSTRLEN];
char grp_str[INET_ADDRSTRLEN];
json_object *json_row;
- bool installed = (vxlan_sg->up)?TRUE:FALSE;
+ bool installed = (vxlan_sg->up) ? true : false;
const char *iif_name = vxlan_sg->iif?vxlan_sg->iif->name:"-";
const char *oif_name;
@@ -9941,7 +9941,7 @@ static void pim_show_vxlan_sg_match_addr(struct pim_instance *pim,
cwd.vty = vty;
cwd.json = json;
- cwd.addr_match = TRUE;
+ cwd.addr_match = true;
hash_iterate(pim->vxlan.sg_hash, pim_show_vxlan_sg_hash_entry, &cwd);
if (uj) {
@@ -9982,7 +9982,7 @@ static void pim_show_vxlan_sg_one(struct pim_instance *pim,
vxlan_sg = pim_vxlan_sg_find(pim, &sg);
if (vxlan_sg) {
- installed = (vxlan_sg->up)?TRUE:FALSE;
+ installed = (vxlan_sg->up) ? true : false;
iif_name = vxlan_sg->iif?vxlan_sg->iif->name:"-";
if (pim_vxlan_is_orig_mroute(vxlan_sg))
@@ -10118,8 +10118,8 @@ DEFUN_HIDDEN (no_ip_pim_mlag,
struct in_addr addr;
addr.s_addr = 0;
- pim_vxlan_mlag_update(TRUE /*mlag_enable*/,
- FALSE /*peer_state*/, PIM_VXLAN_MLAG_ROLE_SECONDARY,
+ pim_vxlan_mlag_update(true/*mlag_enable*/,
+ false/*peer_state*/, PIM_VXLAN_MLAG_ROLE_SECONDARY,
NULL/*peerlink*/, &addr);
return CMD_SUCCESS;
@@ -10169,9 +10169,9 @@ DEFUN_HIDDEN (ip_pim_mlag,
idx += 2;
if (!strcmp(argv[idx]->arg, "up")) {
- peer_state = TRUE;
+ peer_state = true;
} else if (strcmp(argv[idx]->arg, "down")) {
- peer_state = FALSE;
+ peer_state = false;
} else {
vty_out(vty, "unknown MLAG state %s\n", argv[idx]->arg);
return CMD_WARNING;
@@ -10185,7 +10185,7 @@ DEFUN_HIDDEN (ip_pim_mlag,
errno, safe_strerror(errno));
return CMD_WARNING_CONFIG_FAILED;
}
- pim_vxlan_mlag_update(TRUE, peer_state, role, ifp, &reg_addr);
+ pim_vxlan_mlag_update(true, peer_state, role, ifp, &reg_addr);
return CMD_SUCCESS;
}
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 0511a1a15..bdeda2d76 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -134,7 +134,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
pim_ifp->igmp_last_member_query_count =
IGMP_DEFAULT_ROBUSTNESS_VARIABLE;
- /* BSM config on interface: TRUE by default */
+ /* BSM config on interface: true by default */
pim_ifp->bsm_enable = true;
pim_ifp->ucast_bsm_accept = true;
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 96c7e8052..66e64cefa 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -1218,10 +1218,10 @@ void pim_ifchannel_update_could_assert(struct pim_ifchannel *ch)
}
if (new_couldassert) {
- /* CouldAssert(S,G,I) switched from FALSE to TRUE */
+ /* CouldAssert(S,G,I) switched from false to true */
PIM_IF_FLAG_SET_COULD_ASSERT(ch->flags);
} else {
- /* CouldAssert(S,G,I) switched from TRUE to FALSE */
+ /* CouldAssert(S,G,I) switched from true to false */
PIM_IF_FLAG_UNSET_COULD_ASSERT(ch->flags);
if (ch->ifassert_state == PIM_IFASSERT_I_AM_WINNER) {
@@ -1301,10 +1301,10 @@ void pim_ifchannel_update_assert_tracking_desired(struct pim_ifchannel *ch)
}
if (new_atd) {
- /* AssertTrackingDesired(S,G,I) switched from FALSE to TRUE */
+ /* AssertTrackingDesired(S,G,I) switched from false to true */
PIM_IF_FLAG_SET_ASSERT_TRACKING_DESIRED(ch->flags);
} else {
- /* AssertTrackingDesired(S,G,I) switched from TRUE to FALSE */
+ /* AssertTrackingDesired(S,G,I) switched from true to false */
PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(ch->flags);
if (ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER) {
diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c
index 908026ab1..bdef83925 100644
--- a/pimd/pim_macro.c
+++ b/pimd/pim_macro.c
@@ -91,11 +91,11 @@ int pim_macro_chisin_joins(const struct pim_ifchannel *ch)
lost_assert(S,G) =
{ all interfaces I such that
- lost_assert(S,G,I) == TRUE }
+ lost_assert(S,G,I) == true }
bool lost_assert(S,G,I) {
if ( RPF_interface(S) == I ) {
- return FALSE
+ return false
} else {
return ( AssertWinner(S,G,I) != NULL AND
AssertWinner(S,G,I) != me AND
@@ -150,7 +150,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
pim_include(S,G) =
{ all interfaces I such that:
- ( (I_am_DR( I ) AND lost_assert(S,G,I) == FALSE )
+ ( (I_am_DR( I ) AND lost_assert(S,G,I) == false )
OR AssertWinner(S,G,I) == me )
AND local_receiver_include(S,G,I) }
@@ -178,7 +178,7 @@ int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch)
return (
/* I_am_DR( I ) ? */
PIM_I_am_DR(pim_ifp) &&
- /* lost_assert(S,G,I) == FALSE ? */
+ /* lost_assert(S,G,I) == false ? */
(!pim_macro_ch_lost_assert(ch)));
}
@@ -228,7 +228,7 @@ int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch)
return 0; /* false */
}
- /* SPTbit(S,G) == TRUE */
+ /* SPTbit(S,G) == true */
if (ch->upstream->sptbit == PIM_UPSTREAM_SPTBIT_FALSE)
return 0; /* false */
@@ -272,9 +272,9 @@ struct pim_assert_metric pim_macro_spt_assert_metric(const struct pim_rpf *rpf,
following pseudocode:
assert_metric my_assert_metric(S,G,I) {
- if( CouldAssert(S,G,I) == TRUE ) {
+ if( CouldAssert(S,G,I) == true ) {
return spt_assert_metric(S,I)
- } else if( CouldAssert(*,G,I) == TRUE ) {
+ } else if( CouldAssert(*,G,I) == true ) {
return rpt_assert_metric(G,I)
} else {
return infinite_assert_metric()
@@ -365,11 +365,11 @@ int pim_macro_chisin_oiflist(const struct pim_ifchannel *ch)
(+) ( pim_include(*,G) (-) pim_exclude(S,G) )
(-) lost_assert(*,G)
(+) joins(S,G) ) )
- OR (local_receiver_include(S,G,I) == TRUE
+ OR (local_receiver_include(S,G,I) == true
AND (I_am_DR(I) OR (AssertWinner(S,G,I) == me)))
- OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == TRUE))
- OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == TRUE)
- AND (SPTbit(S,G) == FALSE))
+ OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == true))
+ OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == true)
+ AND (SPTbit(S,G) == false))
AssertTrackingDesired(S,G,I) is true on any interface in which an
(S,G) assert might affect our behavior.
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 3fe7e8bf6..4b6661649 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -61,7 +61,7 @@ void pim_register_join(struct pim_upstream *up)
pim_channel_add_oif(up->channel_oil, pim->regiface,
PIM_OIF_FLAG_PROTO_PIM);
up->reg_state = PIM_REG_JOIN;
- pim_vxlan_update_sg_reg_state(pim, up, TRUE /*reg_join*/);
+ pim_vxlan_update_sg_reg_state(pim, up, true /*reg_join*/);
}
void pim_register_stop_send(struct interface *ifp, struct prefix_sg *sg,
@@ -148,7 +148,7 @@ int pim_register_stop_recv(struct interface *ifp, uint8_t *buf, int buf_size)
PIM_OIF_FLAG_PROTO_PIM);
pim_upstream_start_register_stop_timer(upstream, 0);
pim_vxlan_update_sg_reg_state(pim, upstream,
- FALSE /*reg_join*/);
+ false/*reg_join*/);
break;
case PIM_REG_JOIN_PENDING:
upstream->reg_state = PIM_REG_PRUNE;
@@ -283,8 +283,8 @@ void pim_null_register_send(struct pim_upstream *up)
* # Note: this may be a spoofing attempt
* }
* if( I_am_RP(G) AND outer.dst == RP(G) ) {
- * sentRegisterStop = FALSE;
- * if ( register.borderbit == TRUE ) {
+ * sentRegisterStop = false;
+ * if ( register.borderbit == true ) {
* if ( PMBR(S,G) == unknown ) {
* PMBR(S,G) = outer.src
* } else if ( outer.src != PMBR(S,G) ) {
@@ -296,10 +296,10 @@ void pim_null_register_send(struct pim_upstream *up)
* ( SwitchToSptDesired(S,G) AND
* ( inherited_olist(S,G) == NULL ))) {
* send Register-Stop(S,G) to outer.src
- * sentRegisterStop = TRUE;
+ * sentRegisterStop = true;
* }
* if ( SPTbit(S,G) OR SwitchToSptDesired(S,G) ) {
- * if ( sentRegisterStop == TRUE ) {
+ * if ( sentRegisterStop == true ) {
* set KeepaliveTimer(S,G) to RP_Keepalive_Period;
* } else {
* set KeepaliveTimer(S,G) to Keepalive_Period;
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index b1a2e717d..7d263e99e 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -228,7 +228,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
if ((up->sg.src.s_addr == INADDR_ANY && I_am_RP(pim, up->sg.grp)) ||
PIM_UPSTREAM_FLAG_TEST_FHR(up->flags))
- neigh_needed = FALSE;
+ neigh_needed = false;
pim_find_or_track_nexthop(pim, &nht_p, up, NULL, false, NULL);
if (!pim_ecmp_nexthop_lookup(pim, &rpf->source_nexthop, &src, &grp,
neigh_needed))
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 194fb2cff..50df2fdbf 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -1318,14 +1318,14 @@ int pim_upstream_is_sg_rpt(struct pim_upstream *up)
* void
* Update_SPTbit(S,G,iif) {
* if ( iif == RPF_interface(S)
- * AND JoinDesired(S,G) == TRUE
- * AND ( DirectlyConnected(S) == TRUE
+ * AND JoinDesired(S,G) == true
+ * AND ( DirectlyConnected(S) == true
* OR RPF_interface(S) != RPF_interface(RP(G))
* OR inherited_olist(S,G,rpt) == NULL
* OR ( ( RPF'(S,G) == RPF'(*,G) ) AND
* ( RPF'(S,G) != NULL ) )
* OR ( I_Am_Assert_Loser(S,G,iif) ) {
- * Set SPTbit(S,G) to TRUE
+ * Set SPTbit(S,G) to true
* }
* }
*/
@@ -1344,7 +1344,7 @@ void pim_upstream_set_sptbit(struct pim_upstream *up,
return;
}
- // AND JoinDesired(S,G) == TRUE
+ // AND JoinDesired(S,G) == true
if (!pim_upstream_evaluate_join_desired(up->channel_oil->pim, up)) {
if (PIM_DEBUG_TRACE)
zlog_debug("%s: %s Join is not Desired",
@@ -1352,7 +1352,7 @@ void pim_upstream_set_sptbit(struct pim_upstream *up,
return;
}
- // DirectlyConnected(S) == TRUE
+ // DirectlyConnected(S) == true
if (pim_if_connected_to_source(up->rpf.source_nexthop.interface,
up->sg.src)) {
if (PIM_DEBUG_TRACE)
@@ -1456,7 +1456,7 @@ static int pim_upstream_register_stop_timer(struct thread *t)
up->reg_state = PIM_REG_JOIN;
pim_channel_add_oif(up->channel_oil, pim->regiface,
PIM_OIF_FLAG_PROTO_PIM);
- pim_vxlan_update_sg_reg_state(pim, up, TRUE /*reg_join*/);
+ pim_vxlan_update_sg_reg_state(pim, up, true /*reg_join*/);
break;
case PIM_REG_JOIN:
break;
@@ -1690,7 +1690,7 @@ bool pim_upstream_equal(const void *arg1, const void *arg2)
/* rfc4601:section-4.2:"Data Packet Forwarding Rules" defines
* the cases where kat has to be restarted on rxing traffic -
*
- * if( DirectlyConnected(S) == TRUE AND iif == RPF_interface(S) ) {
+ * if( DirectlyConnected(S) == true AND iif == RPF_interface(S) ) {
* set KeepaliveTimer(S,G) to Keepalive_Period
* # Note: a register state transition or UpstreamJPState(S,G)
* # transition may happen as a result of restarting
diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c
index d2648fad5..33e3b2340 100644
--- a/pimd/pim_vxlan.c
+++ b/pimd/pim_vxlan.c
@@ -115,7 +115,7 @@ static void pim_vxlan_init_work(void)
vxlan_info.max_work_cnt = PIM_VXLAN_WORK_MAX;
vxlan_info.flags |= PIM_VXLANF_WORK_INITED;
vxlan_info.work_list = list_new();
- pim_vxlan_work_timer_setup(TRUE /* start */);
+ pim_vxlan_work_timer_setup(true/* start */);
}
static void pim_vxlan_add_work(struct pim_vxlan_sg *vxlan_sg)