summaryrefslogtreecommitdiff
path: root/pimd/pim_pim.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-04-04 14:00:59 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-04-04 14:11:29 +0200
commitb6fcc0b7a65a3e5bff771b0579d4b7eb2997709c (patch)
tree8e455b59c8e80eee58b63654aa406131ebd5ec71 /pimd/pim_pim.c
parent96322c148bfc862a60cbd11bf03a0afab5da4b75 (diff)
pimd: remove useless PIM_IF_* macros
The only function these macros have is to make the code confusing. "PIM_IF_DO_PIM" sounds like it triggers some action, but it doesn't. Replace with "bool" fields in struct pim_interface. (Note: PIM_IF_*_IGMP_LISTEN_ALLROUTERS was always set, without any way to unset it. It is completely removed now and always enabled.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r--pimd/pim_pim.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index 50bbc0fe18..1baa5c38ca 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -526,11 +526,8 @@ void pim_sock_reset(struct interface *ifp)
PIM_DEFAULT_PROPAGATION_DELAY_MSEC;
pim_ifp->pim_override_interval_msec =
PIM_DEFAULT_OVERRIDE_INTERVAL_MSEC;
- if (PIM_DEFAULT_CAN_DISABLE_JOIN_SUPPRESSION) {
- PIM_IF_DO_PIM_CAN_DISABLE_JOIN_SUPPRESSION(pim_ifp->options);
- } else {
- PIM_IF_DONT_PIM_CAN_DISABLE_JOIN_SUPPRESSION(pim_ifp->options);
- }
+ pim_ifp->pim_can_disable_join_suppression =
+ PIM_DEFAULT_CAN_DISABLE_JOIN_SUPPRESSION;
/* neighbors without lan_delay */
pim_ifp->pim_number_of_nonlandelay_neighbors = 0;
@@ -702,8 +699,7 @@ static int hello_send(struct interface *ifp, uint16_t holdtime)
__func__, &qpim_all_pim_routers_addr, ifp->name,
holdtime, pim_ifp->pim_propagation_delay_msec,
pim_ifp->pim_override_interval_msec,
- PIM_IF_TEST_PIM_CAN_DISABLE_JOIN_SUPPRESSION(
- pim_ifp->options),
+ pim_ifp->pim_can_disable_join_suppression,
pim_ifp->pim_dr_priority, pim_ifp->pim_generation_id,
listcount(ifp->connected));
@@ -713,7 +709,7 @@ static int hello_send(struct interface *ifp, uint16_t holdtime)
pim_ifp->pim_dr_priority, pim_ifp->pim_generation_id,
pim_ifp->pim_propagation_delay_msec,
pim_ifp->pim_override_interval_msec,
- PIM_IF_TEST_PIM_CAN_DISABLE_JOIN_SUPPRESSION(pim_ifp->options));
+ pim_ifp->pim_can_disable_join_suppression);
if (pim_tlv_size < 0) {
return -1;
}