summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-06-09 07:06:30 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-06-09 09:37:33 -0400
commitaa0bb312b1730de6c5e5cc102bca427ef5803712 (patch)
treebddeb4ac85d55e03b1baf8b55548ed1489c11ed6
parentb2e37a56f60455c0bf935f26309ae596ef5ee34f (diff)
pimd: Fixup oil_if_has and oil_if_set to be consistent
the v4 and v6 versions were different. Make them the same. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--pimd/pim_oil.c2
-rw-r--r--pimd/pim_oil.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c
index 9434ae07b7..8fa2c96034 100644
--- a/pimd/pim_oil.c
+++ b/pimd/pim_oil.c
@@ -255,7 +255,7 @@ int pim_channel_del_oif(struct channel_oil *channel_oil, struct interface *oif,
return 0;
}
- oil_if_set(channel_oil, pim_ifp->mroute_vif_index, false);
+ oil_if_set(channel_oil, pim_ifp->mroute_vif_index, 0);
/* clear mute; will be re-evaluated when the OIF becomes valid again */
channel_oil->oif_flags[pim_ifp->mroute_vif_index] &= ~PIM_OIF_FLAG_MUTE;
diff --git a/pimd/pim_oil.h b/pimd/pim_oil.h
index eed4b203cd..d0c4921d07 100644
--- a/pimd/pim_oil.h
+++ b/pimd/pim_oil.h
@@ -130,9 +130,9 @@ static inline vifi_t *oil_parent(struct channel_oil *c_oil)
return &c_oil->oil.mfcc_parent;
}
-static inline uint8_t oil_if_has(struct channel_oil *c_oil, vifi_t ifi)
+static inline bool oil_if_has(struct channel_oil *c_oil, vifi_t ifi)
{
- return c_oil->oil.mfcc_ttls[ifi];
+ return !!c_oil->oil.mfcc_ttls[ifi];
}
static inline void oil_if_set(struct channel_oil *c_oil, vifi_t ifi, uint8_t set)
@@ -166,7 +166,8 @@ static inline bool oil_if_has(struct channel_oil *c_oil, mifi_t ifi)
return !!IF_ISSET(ifi, &c_oil->oil.mf6cc_ifset);
}
-static inline void oil_if_set(struct channel_oil *c_oil, mifi_t ifi, bool set)
+static inline void oil_if_set(struct channel_oil *c_oil, mifi_t ifi,
+ uint8_t set)
{
if (set)
IF_SET(ifi, &c_oil->oil.mf6cc_ifset);