summaryrefslogtreecommitdiffstats
path: root/pimd/pim_igmpv3.c
diff options
context:
space:
mode:
authorSai Gomathi <nsaigomathi@vmware.com>2021-12-03 08:05:02 +0100
committerSai Gomathi <nsaigomathi@vmware.com>2021-12-03 08:12:58 +0100
commitea7d74d702975def719a574f0b58d642abeef974 (patch)
treebf25b70f91f5e75e0fadb3de80eeaaaf6228a798 /pimd/pim_igmpv3.c
parentMerge pull request #10110 from idryzhov/if-yang-remove-vrf (diff)
downloadfrr-ea7d74d702975def719a574f0b58d642abeef974.tar.xz
frr-ea7d74d702975def719a574f0b58d642abeef974.zip
pimd: Modifying members of pim_interface to accommodate IPv6 changes
Modifying the members of pim_interface which are to be used for both IPv4 and IPv6 to common names(for both MLD and IGMP). Issue: #10023 Co-authored-by: Mobashshera Rasool <mrasool@vmware.com> Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_igmpv3.c')
-rw-r--r--pimd/pim_igmpv3.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index 13db11fa8..ea4bcb298 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -65,12 +65,12 @@ static inline long igmp_gmi_msec(struct igmp_group *group)
long qrv = 0, qqi = 0;
- for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) {
+ for (ALL_LIST_ELEMENTS_RO(pim_ifp->socket_list, sock_node, igmp)) {
qrv = MAX(qrv, igmp->querier_robustness_variable);
qqi = MAX(qqi, igmp->querier_query_interval);
}
return PIM_IGMP_GMI_MSEC(qrv, qqi,
- pim_ifp->igmp_query_max_response_time_dsec);
+ pim_ifp->query_max_response_time_dsec);
}
void igmp_group_reset_gmi(struct igmp_group *group)
@@ -985,14 +985,13 @@ static void igmp_send_query_group(struct igmp_group *group, char *query_buf,
struct igmp_sock *igmp;
struct listnode *sock_node;
- for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) {
- igmp_send_query(
- pim_ifp->igmp_version, group, igmp->fd, ifp->name,
- query_buf, query_buf_size, num_sources,
- group->group_addr, group->group_addr,
- pim_ifp->igmp_specific_query_max_response_time_dsec,
- s_flag, igmp->querier_robustness_variable,
- igmp->querier_query_interval);
+ for (ALL_LIST_ELEMENTS_RO(pim_ifp->socket_list, sock_node, igmp)) {
+ igmp_send_query(pim_ifp->version, group, igmp->fd, ifp->name,
+ query_buf, query_buf_size, num_sources,
+ group->group_addr, group->group_addr,
+ pim_ifp->specific_query_max_response_time_dsec,
+ s_flag, igmp->querier_robustness_variable,
+ igmp->querier_query_interval);
}
}
@@ -1014,7 +1013,7 @@ static void group_retransmit_group(struct igmp_group *group)
pim_ifp = group->interface->info;
- if (pim_ifp->igmp_version == 3) {
+ if (pim_ifp->version == 3) {
query_buf_size = PIM_IGMP_BUFSIZE_WRITE;
} else {
query_buf_size = IGMP_V12_MSG_SIZE;
@@ -1022,8 +1021,8 @@ static void group_retransmit_group(struct igmp_group *group)
char query_buf[query_buf_size];
- lmqc = pim_ifp->igmp_last_member_query_count;
- lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec;
+ lmqc = pim_ifp->last_member_query_count;
+ lmqi_msec = 100 * pim_ifp->specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec;
/*
@@ -1092,8 +1091,8 @@ static int group_retransmit_sources(struct igmp_group *group,
pim_ifp = group->interface->info;
- lmqc = pim_ifp->igmp_last_member_query_count;
- lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec;
+ lmqc = pim_ifp->last_member_query_count;
+ lmqi_msec = 100 * pim_ifp->specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec;
/* Scan all group sources */
@@ -1284,7 +1283,7 @@ static void group_retransmit_timer_on(struct igmp_group *group)
pim_ifp = group->interface->info;
- lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec;
+ lmqi_msec = 100 * pim_ifp->specific_query_max_response_time_dsec;
if (PIM_DEBUG_IGMP_TRACE) {
char group_str[INET_ADDRSTRLEN];
@@ -1320,7 +1319,7 @@ static void group_query_send(struct igmp_group *group)
long lmqc; /* Last Member Query Count */
pim_ifp = group->interface->info;
- lmqc = pim_ifp->igmp_last_member_query_count;
+ lmqc = pim_ifp->last_member_query_count;
/* lower group timer to lmqt */
igmp_group_timer_lower_to_lmqt(group);
@@ -1353,8 +1352,8 @@ static void source_query_send_by_flag(struct igmp_group *group,
pim_ifp = group->interface->info;
- lmqc = pim_ifp->igmp_last_member_query_count;
- lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec;
+ lmqc = pim_ifp->last_member_query_count;
+ lmqi_msec = 100 * pim_ifp->specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec;
/*
@@ -1510,8 +1509,8 @@ void igmp_group_timer_lower_to_lmqt(struct igmp_group *group)
pim_ifp = ifp->info;
ifname = ifp->name;
- lmqi_dsec = pim_ifp->igmp_specific_query_max_response_time_dsec;
- lmqc = pim_ifp->igmp_last_member_query_count;
+ lmqi_dsec = pim_ifp->specific_query_max_response_time_dsec;
+ lmqc = pim_ifp->last_member_query_count;
lmqt_msec = PIM_IGMP_LMQT_MSEC(
lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */
@@ -1545,8 +1544,8 @@ void igmp_source_timer_lower_to_lmqt(struct igmp_source *source)
pim_ifp = ifp->info;
ifname = ifp->name;
- lmqi_dsec = pim_ifp->igmp_specific_query_max_response_time_dsec;
- lmqc = pim_ifp->igmp_last_member_query_count;
+ lmqi_dsec = pim_ifp->specific_query_max_response_time_dsec;
+ lmqc = pim_ifp->last_member_query_count;
lmqt_msec = PIM_IGMP_LMQT_MSEC(
lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */
@@ -1718,7 +1717,7 @@ void igmp_v3_recv_query(struct igmp_sock *igmp, const char *from_str,
resv_s_qrv = igmp_msg[8];
qrv = 7 & resv_s_qrv;
igmp->querier_robustness_variable =
- qrv ? qrv : pim_ifp->igmp_default_robustness_variable;
+ qrv ? qrv : pim_ifp->default_robustness_variable;
/*
* RFC 3376: 4.1.7. QQIC (Querier's Query Interval Code)
@@ -1735,7 +1734,7 @@ void igmp_v3_recv_query(struct igmp_sock *igmp, const char *from_str,
qqic = igmp_msg[9];
qqi = igmp_msg_decode8to16(qqic);
igmp->querier_query_interval =
- qqi ? qqi : pim_ifp->igmp_default_query_interval;
+ qqi ? qqi : pim_ifp->default_query_interval;
if (PIM_DEBUG_IGMP_TRACE) {
char ifaddr_str[INET_ADDRSTRLEN];