Merge pull request #10279 from SaiGomathiN/pim_intf

This commit is contained in:
David Lamparter 2022-01-13 16:13:54 +01:00 committed by GitHub
commit 1c4d0ea4b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 165 additions and 165 deletions

View File

@ -508,7 +508,7 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
if (!pim_ifp) if (!pim_ifp)
continue; continue;
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node,
igmp)) { igmp)) {
char uptime[10]; char uptime[10];
char query_hhmmss[10]; char query_hhmmss[10];
@ -610,7 +610,7 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
if (strcmp(ifname, "detail") && strcmp(ifname, ifp->name)) if (strcmp(ifname, "detail") && strcmp(ifname, ifp->name))
continue; continue;
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node,
igmp)) { igmp)) {
found_ifname = 1; found_ifname = 1;
pim_time_uptime(uptime, sizeof(uptime), pim_time_uptime(uptime, sizeof(uptime),
@ -625,35 +625,34 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
gmi_msec = PIM_IGMP_GMI_MSEC( gmi_msec = PIM_IGMP_GMI_MSEC(
igmp->querier_robustness_variable, igmp->querier_robustness_variable,
igmp->querier_query_interval, igmp->querier_query_interval,
pim_ifp->igmp_query_max_response_time_dsec); pim_ifp->gm_query_max_response_time_dsec);
sqi = PIM_IGMP_SQI( sqi = PIM_IGMP_SQI(pim_ifp->gm_default_query_interval);
pim_ifp->igmp_default_query_interval);
oqpi_msec = PIM_IGMP_OQPI_MSEC( oqpi_msec = PIM_IGMP_OQPI_MSEC(
igmp->querier_robustness_variable, igmp->querier_robustness_variable,
igmp->querier_query_interval, igmp->querier_query_interval,
pim_ifp->igmp_query_max_response_time_dsec); pim_ifp->gm_query_max_response_time_dsec);
lmqt_msec = PIM_IGMP_LMQT_MSEC( lmqt_msec = PIM_IGMP_LMQT_MSEC(
pim_ifp->igmp_specific_query_max_response_time_dsec, pim_ifp->gm_specific_query_max_response_time_dsec,
pim_ifp->igmp_last_member_query_count); pim_ifp->gm_last_member_query_count);
ohpi_msec = ohpi_msec =
PIM_IGMP_OHPI_DSEC( PIM_IGMP_OHPI_DSEC(
igmp->querier_robustness_variable, igmp->querier_robustness_variable,
igmp->querier_query_interval, igmp->querier_query_interval,
pim_ifp->igmp_query_max_response_time_dsec) pim_ifp->gm_query_max_response_time_dsec) *
* 100; 100;
qri_msec = pim_ifp->igmp_query_max_response_time_dsec qri_msec =
* 100; pim_ifp->gm_query_max_response_time_dsec * 100;
if (pim_ifp->pim_sock_fd >= 0) if (pim_ifp->pim_sock_fd >= 0)
mloop = pim_socket_mcastloop_get( mloop = pim_socket_mcastloop_get(
pim_ifp->pim_sock_fd); pim_ifp->pim_sock_fd);
else else
mloop = 0; mloop = 0;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
if (uj) { if (uj) {
json_row = json_object_new_object(); json_row = json_object_new_object();
@ -833,14 +832,14 @@ static void igmp_show_interface_join(struct pim_instance *pim, struct vty *vty,
if (!pim_ifp) if (!pim_ifp)
continue; continue;
if (!pim_ifp->igmp_join_list) if (!pim_ifp->gm_join_list)
continue; continue;
pri_addr = pim_find_primary_addr(ifp); pri_addr = pim_find_primary_addr(ifp);
pim_inet4_dump("<pri?>", pri_addr, pri_addr_str, pim_inet4_dump("<pri?>", pri_addr, pri_addr_str,
sizeof(pri_addr_str)); sizeof(pri_addr_str));
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_join_list, join_node, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_join_list, join_node,
ij)) { ij)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN]; char source_str[INET_ADDRSTRLEN];
@ -887,7 +886,7 @@ static void igmp_show_interface_join(struct pim_instance *pim, struct vty *vty,
ifp->name, pri_addr_str, source_str, ifp->name, pri_addr_str, source_str,
group_str, ij->sock_fd, uptime); group_str, ij->sock_fd, uptime);
} }
} /* for (pim_ifp->igmp_join_list) */ } /* for (pim_ifp->gm_join_list) */
} /* for (iflist) */ } /* for (iflist) */
@ -1340,7 +1339,7 @@ static void igmp_show_statistics(struct pim_instance *pim, struct vty *vty,
if (ifname && strcmp(ifname, ifp->name)) if (ifname && strcmp(ifname, ifp->name))
continue; continue;
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node,
igmp)) { igmp)) {
igmp_stats_add(&rx_stats, &igmp->rx_stats); igmp_stats_add(&rx_stats, &igmp->rx_stats);
} }
@ -3429,7 +3428,7 @@ static void igmp_show_groups(struct pim_instance *pim, struct vty *vty, bool uj)
continue; continue;
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode,
grp)) { grp)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
char hhmmss[10]; char hhmmss[10];
@ -3523,7 +3522,7 @@ static void igmp_show_group_retransmission(struct pim_instance *pim,
continue; continue;
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode,
grp)) { grp)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
char grp_retr_mmss[10]; char grp_retr_mmss[10];
@ -3576,7 +3575,7 @@ static void igmp_show_sources(struct pim_instance *pim, struct vty *vty)
continue; continue;
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode,
grp)) { grp)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
struct listnode *srcnode; struct listnode *srcnode;
@ -3632,7 +3631,7 @@ static void igmp_show_source_retransmission(struct pim_instance *pim,
continue; continue;
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode,
grp)) { grp)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
struct listnode *srcnode; struct listnode *srcnode;
@ -3923,9 +3922,9 @@ static void clear_mroute(struct pim_instance *pim)
/* clean up all igmp groups */ /* clean up all igmp groups */
if (pim_ifp->igmp_group_list) { if (pim_ifp->gm_group_list) {
while (pim_ifp->igmp_group_list->count) { while (pim_ifp->gm_group_list->count) {
grp = listnode_head(pim_ifp->igmp_group_list); grp = listnode_head(pim_ifp->gm_group_list);
igmp_group_delete(grp); igmp_group_delete(grp);
} }
} }

View File

@ -125,15 +125,14 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
pim_ifp->mroute_vif_index = -1; pim_ifp->mroute_vif_index = -1;
pim_ifp->igmp_version = IGMP_DEFAULT_VERSION; pim_ifp->igmp_version = IGMP_DEFAULT_VERSION;
pim_ifp->igmp_default_robustness_variable = pim_ifp->gm_default_robustness_variable =
IGMP_DEFAULT_ROBUSTNESS_VARIABLE; IGMP_DEFAULT_ROBUSTNESS_VARIABLE;
pim_ifp->igmp_default_query_interval = IGMP_GENERAL_QUERY_INTERVAL; pim_ifp->gm_default_query_interval = IGMP_GENERAL_QUERY_INTERVAL;
pim_ifp->igmp_query_max_response_time_dsec = pim_ifp->gm_query_max_response_time_dsec =
IGMP_QUERY_MAX_RESPONSE_TIME_DSEC; IGMP_QUERY_MAX_RESPONSE_TIME_DSEC;
pim_ifp->igmp_specific_query_max_response_time_dsec = pim_ifp->gm_specific_query_max_response_time_dsec =
IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC; IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC;
pim_ifp->igmp_last_member_query_count = pim_ifp->gm_last_member_query_count = IGMP_DEFAULT_ROBUSTNESS_VARIABLE;
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->bsm_enable = true;
@ -145,8 +144,8 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
The number of seconds represented by the [Query Response Interval] The number of seconds represented by the [Query Response Interval]
must be less than the [Query Interval]. must be less than the [Query Interval].
*/ */
assert(pim_ifp->igmp_query_max_response_time_dsec assert(pim_ifp->gm_query_max_response_time_dsec <
< pim_ifp->igmp_default_query_interval); pim_ifp->gm_default_query_interval);
if (pim) if (pim)
PIM_IF_DO_PIM(pim_ifp->options); PIM_IF_DO_PIM(pim_ifp->options);
@ -155,7 +154,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
PIM_IF_DO_IGMP_LISTEN_ALLROUTERS(pim_ifp->options); PIM_IF_DO_IGMP_LISTEN_ALLROUTERS(pim_ifp->options);
pim_ifp->igmp_join_list = NULL; pim_ifp->gm_join_list = NULL;
pim_ifp->pim_neighbor_list = NULL; pim_ifp->pim_neighbor_list = NULL;
pim_ifp->upstream_switch_list = NULL; pim_ifp->upstream_switch_list = NULL;
pim_ifp->pim_generation_id = 0; pim_ifp->pim_generation_id = 0;
@ -200,7 +199,7 @@ void pim_if_delete(struct interface *ifp)
pim_ifp = ifp->info; pim_ifp = ifp->info;
assert(pim_ifp); assert(pim_ifp);
if (pim_ifp->igmp_join_list) { if (pim_ifp->gm_join_list) {
pim_if_igmp_join_del_all(ifp); pim_if_igmp_join_del_all(ifp);
} }
@ -535,27 +534,27 @@ void pim_if_addr_add(struct connected *ifc)
struct gm_sock *igmp; struct gm_sock *igmp;
/* lookup IGMP socket */ /* lookup IGMP socket */
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list,
ifaddr); ifaddr);
if (!igmp) { if (!igmp) {
/* if addr new, add IGMP socket */ /* if addr new, add IGMP socket */
if (ifc->address->family == AF_INET) if (ifc->address->family == AF_INET)
pim_igmp_sock_add(pim_ifp->igmp_socket_list, pim_igmp_sock_add(pim_ifp->gm_socket_list,
ifaddr, ifp, false); ifaddr, ifp, false);
} else if (igmp->mtrace_only) { } else if (igmp->mtrace_only) {
igmp_sock_delete(igmp); igmp_sock_delete(igmp);
pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, pim_igmp_sock_add(pim_ifp->gm_socket_list, ifaddr, ifp,
ifp, false); false);
} }
/* Replay Static IGMP groups */ /* Replay Static IGMP groups */
if (pim_ifp->igmp_join_list) { if (pim_ifp->gm_join_list) {
struct listnode *node; struct listnode *node;
struct listnode *nextnode; struct listnode *nextnode;
struct gm_join *ij; struct gm_join *ij;
int join_fd; int join_fd;
for (ALL_LIST_ELEMENTS(pim_ifp->igmp_join_list, node, for (ALL_LIST_ELEMENTS(pim_ifp->gm_join_list, node,
nextnode, ij)) { nextnode, ij)) {
/* Close socket and reopen with Source and Group /* Close socket and reopen with Source and Group
*/ */
@ -586,14 +585,14 @@ void pim_if_addr_add(struct connected *ifc)
struct gm_sock *igmp; struct gm_sock *igmp;
/* lookup IGMP socket */ /* lookup IGMP socket */
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list,
ifaddr); ifaddr);
if (ifc->address->family == AF_INET) { if (ifc->address->family == AF_INET) {
if (igmp) if (igmp)
igmp_sock_delete(igmp); igmp_sock_delete(igmp);
/* if addr new, add IGMP socket */ /* if addr new, add IGMP socket */
pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, pim_igmp_sock_add(pim_ifp->gm_socket_list, ifaddr, ifp,
ifp, true); true);
} }
} /* igmp mtrace only */ } /* igmp mtrace only */
@ -664,7 +663,7 @@ static void pim_if_addr_del_igmp(struct connected *ifc)
ifaddr = ifc->address->u.prefix4; ifaddr = ifc->address->u.prefix4;
/* lookup IGMP socket */ /* lookup IGMP socket */
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, ifaddr); igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list, ifaddr);
if (igmp) { if (igmp) {
/* if addr found, del IGMP socket */ /* if addr found, del IGMP socket */
igmp_sock_delete(igmp); igmp_sock_delete(igmp);
@ -1245,7 +1244,7 @@ static struct gm_join *igmp_join_new(struct interface *ifp,
ij->source_addr = source_addr; ij->source_addr = source_addr;
ij->sock_creation = pim_time_monotonic_sec(); ij->sock_creation = pim_time_monotonic_sec();
listnode_add(pim_ifp->igmp_join_list, ij); listnode_add(pim_ifp->gm_join_list, ij);
return ij; return ij;
} }
@ -1262,12 +1261,12 @@ ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr,
ifp->name); ifp->name);
} }
if (!pim_ifp->igmp_join_list) { if (!pim_ifp->gm_join_list) {
pim_ifp->igmp_join_list = list_new(); pim_ifp->gm_join_list = list_new();
pim_ifp->igmp_join_list->del = (void (*)(void *))igmp_join_free; pim_ifp->gm_join_list->del = (void (*)(void *))igmp_join_free;
} }
ij = igmp_join_find(pim_ifp->igmp_join_list, group_addr, source_addr); ij = igmp_join_find(pim_ifp->gm_join_list, group_addr, source_addr);
/* This interface has already been configured to join this IGMP group /* This interface has already been configured to join this IGMP group
*/ */
@ -1306,13 +1305,13 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr,
return -1; return -1;
} }
if (!pim_ifp->igmp_join_list) { if (!pim_ifp->gm_join_list) {
zlog_warn("%s: no IGMP join on interface %s", __func__, zlog_warn("%s: no IGMP join on interface %s", __func__,
ifp->name); ifp->name);
return -2; return -2;
} }
ij = igmp_join_find(pim_ifp->igmp_join_list, group_addr, source_addr); ij = igmp_join_find(pim_ifp->gm_join_list, group_addr, source_addr);
if (!ij) { if (!ij) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN]; char source_str[INET_ADDRSTRLEN];
@ -1339,11 +1338,11 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr,
errno, safe_strerror(errno)); errno, safe_strerror(errno));
/* warning only */ /* warning only */
} }
listnode_delete(pim_ifp->igmp_join_list, ij); listnode_delete(pim_ifp->gm_join_list, ij);
igmp_join_free(ij); igmp_join_free(ij);
if (listcount(pim_ifp->igmp_join_list) < 1) { if (listcount(pim_ifp->gm_join_list) < 1) {
list_delete(&pim_ifp->igmp_join_list); list_delete(&pim_ifp->gm_join_list);
pim_ifp->igmp_join_list = 0; pim_ifp->gm_join_list = 0;
} }
return 0; return 0;
@ -1363,10 +1362,10 @@ static void pim_if_igmp_join_del_all(struct interface *ifp)
return; return;
} }
if (!pim_ifp->igmp_join_list) if (!pim_ifp->gm_join_list)
return; return;
for (ALL_LIST_ELEMENTS(pim_ifp->igmp_join_list, node, nextnode, ij)) for (ALL_LIST_ELEMENTS(pim_ifp->gm_join_list, node, nextnode, ij))
pim_if_igmp_join_del(ifp, ij->group_addr, ij->source_addr); pim_if_igmp_join_del(ifp, ij->group_addr, ij->source_addr);
} }

View File

@ -99,25 +99,28 @@ struct pim_interface {
struct list *sec_addr_list; /* list of struct pim_secondary_addr */ struct list *sec_addr_list; /* list of struct pim_secondary_addr */
pim_addr update_source; /* user can statically set the primary pim_addr update_source; /* user can statically set the primary
* address of the interface */ * address of the interface */
int igmp_version; /* IGMP or MLD version */
int igmp_default_robustness_variable; /* IGMP or MLD QRV */ int igmp_version; /* IGMP version */
int igmp_default_query_interval; /* IGMP or MLD secs between general int gm_default_robustness_variable; /* IGMP or MLD QRV */
int gm_default_query_interval; /* IGMP or MLD secs between general
queries */ queries */
int igmp_query_max_response_time_dsec; /* IGMPv3 Max Response Time in int gm_query_max_response_time_dsec; /* IGMP or MLD Max Response Time in
dsecs for general queries */ dsecs for general queries */
int igmp_specific_query_max_response_time_dsec; /* IGMPv3 Max Response int gm_specific_query_max_response_time_dsec; /* IGMP or MLD Max
Time in dsecs called Response Time in dsecs
as last member query called as last member
interval, defines the query interval, defines
maximum response time the maximum response
advertised in IGMP time advertised in IGMP
group-specific group-specific
queries */ queries */
int igmp_last_member_query_count; /* IGMP last member query count */ int gm_last_member_query_count; /* IGMP or MLD last member
struct list *igmp_socket_list; /* list of struct igmp_sock */ query count
struct list *igmp_join_list; /* list of struct igmp_join */ */
struct list *igmp_group_list; /* list of struct igmp_group */ struct list *gm_socket_list; /* list of struct IGMP or MLD sock */
struct hash *igmp_group_hash; struct list *gm_join_list; /* list of struct IGMP or MLD join */
struct list *gm_group_list; /* list of struct IGMP or MLD group */
struct hash *gm_group_hash;
int pim_sock_fd; /* PIM socket file descriptor */ int pim_sock_fd; /* PIM socket file descriptor */
struct thread *t_pim_sock_read; /* thread for reading PIM socket */ struct thread *t_pim_sock_read; /* thread for reading PIM socket */
@ -188,8 +191,8 @@ struct pim_interface {
}; };
/* /*
if default_holdtime is set (>= 0), use it; * if default_holdtime is set (>= 0), use it;
otherwise default_holdtime is 3.5 * hello_period * otherwise default_holdtime is 3.5 * hello_period
*/ */
#define PIM_IF_DEFAULT_HOLDTIME(pim_ifp) \ #define PIM_IF_DEFAULT_HOLDTIME(pim_ifp) \
(((pim_ifp)->pim_default_holdtime < 0) \ (((pim_ifp)->pim_default_holdtime < 0) \

View File

@ -226,7 +226,7 @@ void pim_igmp_other_querier_timer_on(struct gm_sock *igmp)
*/ */
other_querier_present_interval_msec = PIM_IGMP_OQPI_MSEC( other_querier_present_interval_msec = PIM_IGMP_OQPI_MSEC(
igmp->querier_robustness_variable, igmp->querier_query_interval, igmp->querier_robustness_variable, igmp->querier_query_interval,
pim_ifp->igmp_query_max_response_time_dsec); pim_ifp->gm_query_max_response_time_dsec);
if (PIM_DEBUG_IGMP_TRACE) { if (PIM_DEBUG_IGMP_TRACE) {
char ifaddr_str[INET_ADDRSTRLEN]; char ifaddr_str[INET_ADDRSTRLEN];
@ -636,14 +636,14 @@ void pim_igmp_general_query_on(struct gm_sock *igmp)
* newly configured igmp interface send it out in 1 second * newly configured igmp interface send it out in 1 second
* just to give the entire world a tiny bit of time to settle * just to give the entire world a tiny bit of time to settle
* else the query interval is: * else the query interval is:
* query_interval = pim_ifp->igmp_default_query_interval >> 2; * query_interval = pim_ifp->gm_default_query_interval >> 2;
*/ */
if (igmp->startup_query_count if (igmp->startup_query_count ==
== igmp->querier_robustness_variable) igmp->querier_robustness_variable)
query_interval = 1; query_interval = 1;
else else
query_interval = PIM_IGMP_SQI( query_interval = PIM_IGMP_SQI(
pim_ifp->igmp_default_query_interval); pim_ifp->gm_default_query_interval);
--igmp->startup_query_count; --igmp->startup_query_count;
} else { } else {
@ -729,7 +729,7 @@ static int pim_igmp_general_query(struct thread *t)
igmp_send_query(pim_ifp->igmp_version, 0 /* igmp_group */, igmp->fd, igmp_send_query(pim_ifp->igmp_version, 0 /* igmp_group */, igmp->fd,
igmp->interface->name, query_buf, sizeof(query_buf), igmp->interface->name, query_buf, sizeof(query_buf),
0 /* num_sources */, dst_addr, group_addr, 0 /* num_sources */, dst_addr, group_addr,
pim_ifp->igmp_query_max_response_time_dsec, pim_ifp->gm_query_max_response_time_dsec,
1 /* s_flag: always set for general queries */, 1 /* s_flag: always set for general queries */,
igmp->querier_robustness_variable, igmp->querier_robustness_variable,
igmp->querier_query_interval); igmp->querier_query_interval);
@ -787,7 +787,7 @@ void igmp_startup_mode_on(struct gm_sock *igmp)
/* /*
Since we're (re)starting, reset QQI to default Query Interval Since we're (re)starting, reset QQI to default Query Interval
*/ */
igmp->querier_query_interval = pim_ifp->igmp_default_query_interval; igmp->querier_query_interval = pim_ifp->gm_default_query_interval;
} }
static void igmp_group_free(struct gm_group *group) static void igmp_group_free(struct gm_group *group)
@ -844,8 +844,8 @@ void igmp_group_delete(struct gm_group *group)
group_timer_off(group); group_timer_off(group);
igmp_group_count_decr(pim_ifp); igmp_group_count_decr(pim_ifp);
listnode_delete(pim_ifp->igmp_group_list, group); listnode_delete(pim_ifp->gm_group_list, group);
hash_release(pim_ifp->igmp_group_hash, group); hash_release(pim_ifp->gm_group_hash, group);
igmp_group_free(group); igmp_group_free(group);
} }
@ -875,11 +875,11 @@ void igmp_sock_delete(struct gm_sock *igmp)
pim_ifp = igmp->interface->info; pim_ifp = igmp->interface->info;
listnode_delete(pim_ifp->igmp_socket_list, igmp); listnode_delete(pim_ifp->gm_socket_list, igmp);
igmp_sock_free(igmp); igmp_sock_free(igmp);
if (!listcount(pim_ifp->igmp_socket_list)) if (!listcount(pim_ifp->gm_socket_list))
pim_igmp_if_reset(pim_ifp); pim_igmp_if_reset(pim_ifp);
} }
@ -891,7 +891,7 @@ void igmp_sock_delete_all(struct interface *ifp)
pim_ifp = ifp->info; pim_ifp = ifp->info;
for (ALL_LIST_ELEMENTS(pim_ifp->igmp_socket_list, igmp_node, for (ALL_LIST_ELEMENTS(pim_ifp->gm_socket_list, igmp_node,
igmp_nextnode, igmp)) { igmp_nextnode, igmp)) {
igmp_sock_delete(igmp); igmp_sock_delete(igmp);
} }
@ -919,15 +919,15 @@ void pim_igmp_if_init(struct pim_interface *pim_ifp, struct interface *ifp)
{ {
char hash_name[64]; char hash_name[64];
pim_ifp->igmp_socket_list = list_new(); pim_ifp->gm_socket_list = list_new();
pim_ifp->igmp_socket_list->del = (void (*)(void *))igmp_sock_free; pim_ifp->gm_socket_list->del = (void (*)(void *))igmp_sock_free;
pim_ifp->igmp_group_list = list_new(); pim_ifp->gm_group_list = list_new();
pim_ifp->igmp_group_list->del = (void (*)(void *))igmp_group_free; pim_ifp->gm_group_list->del = (void (*)(void *))igmp_group_free;
snprintf(hash_name, sizeof(hash_name), "IGMP %s hash", ifp->name); snprintf(hash_name, sizeof(hash_name), "IGMP %s hash", ifp->name);
pim_ifp->igmp_group_hash = hash_create( pim_ifp->gm_group_hash = hash_create(igmp_group_hash_key,
igmp_group_hash_key, igmp_group_hash_equal, hash_name); igmp_group_hash_equal, hash_name);
} }
void pim_igmp_if_reset(struct pim_interface *pim_ifp) void pim_igmp_if_reset(struct pim_interface *pim_ifp)
@ -935,7 +935,7 @@ void pim_igmp_if_reset(struct pim_interface *pim_ifp)
struct listnode *grp_node, *grp_nextnode; struct listnode *grp_node, *grp_nextnode;
struct gm_group *grp; struct gm_group *grp;
for (ALL_LIST_ELEMENTS(pim_ifp->igmp_group_list, grp_node, grp_nextnode, for (ALL_LIST_ELEMENTS(pim_ifp->gm_group_list, grp_node, grp_nextnode,
grp)) { grp)) {
igmp_group_delete(grp); igmp_group_delete(grp);
} }
@ -945,13 +945,13 @@ void pim_igmp_if_fini(struct pim_interface *pim_ifp)
{ {
pim_igmp_if_reset(pim_ifp); pim_igmp_if_reset(pim_ifp);
assert(pim_ifp->igmp_group_list); assert(pim_ifp->gm_group_list);
assert(!listcount(pim_ifp->igmp_group_list)); assert(!listcount(pim_ifp->gm_group_list));
list_delete(&pim_ifp->igmp_group_list); list_delete(&pim_ifp->gm_group_list);
hash_free(pim_ifp->igmp_group_hash); hash_free(pim_ifp->gm_group_hash);
list_delete(&pim_ifp->igmp_socket_list); list_delete(&pim_ifp->gm_socket_list);
} }
static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr, static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
@ -978,7 +978,7 @@ static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
igmp->t_igmp_query_timer = NULL; igmp->t_igmp_query_timer = NULL;
igmp->t_other_querier_timer = NULL; /* no other querier present */ igmp->t_other_querier_timer = NULL; /* no other querier present */
igmp->querier_robustness_variable = igmp->querier_robustness_variable =
pim_ifp->igmp_default_robustness_variable; pim_ifp->gm_default_robustness_variable;
igmp->sock_creation = pim_time_monotonic_sec(); igmp->sock_creation = pim_time_monotonic_sec();
igmp_stats_init(&igmp->rx_stats); igmp_stats_init(&igmp->rx_stats);
@ -993,7 +993,7 @@ static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
/* /*
igmp_startup_mode_on() will reset QQI: igmp_startup_mode_on() will reset QQI:
igmp->querier_query_interval = pim_ifp->igmp_default_query_interval; igmp->querier_query_interval = pim_ifp->gm_default_query_interval;
*/ */
igmp_startup_mode_on(igmp); igmp_startup_mode_on(igmp);
pim_igmp_general_query_on(igmp); pim_igmp_general_query_on(igmp);
@ -1188,7 +1188,7 @@ struct gm_group *find_group_by_addr(struct gm_sock *igmp,
lookup.group_addr.s_addr = group_addr.s_addr; lookup.group_addr.s_addr = group_addr.s_addr;
return hash_lookup(pim_ifp->igmp_group_hash, &lookup); return hash_lookup(pim_ifp->gm_group_hash, &lookup);
} }
struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp, struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp,
@ -1246,8 +1246,8 @@ struct gm_group *igmp_add_group_by_addr(struct gm_sock *igmp,
/* initialize new group as INCLUDE {empty} */ /* initialize new group as INCLUDE {empty} */
group->group_filtermode_isexcl = 0; /* 0=INCLUDE, 1=EXCLUDE */ group->group_filtermode_isexcl = 0; /* 0=INCLUDE, 1=EXCLUDE */
listnode_add(pim_ifp->igmp_group_list, group); listnode_add(pim_ifp->gm_group_list, group);
group = hash_get(pim_ifp->igmp_group_hash, group, hash_alloc_intern); group = hash_get(pim_ifp->gm_group_hash, group, hash_alloc_intern);
if (PIM_DEBUG_IGMP_TRACE) { if (PIM_DEBUG_IGMP_TRACE) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
@ -1317,10 +1317,9 @@ void igmp_send_query_on_intf(struct interface *ifp, int igmp_ver)
group_addr.s_addr = PIM_NET_INADDR_ANY; group_addr.s_addr = PIM_NET_INADDR_ANY;
if (PIM_DEBUG_IGMP_TRACE) if (PIM_DEBUG_IGMP_TRACE)
zlog_debug("Issuing general query on request on %s", zlog_debug("Issuing general query on request on %s", ifp->name);
ifp->name);
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node, igmp)) {
char query_buf[query_buf_size]; char query_buf[query_buf_size];
@ -1328,7 +1327,7 @@ void igmp_send_query_on_intf(struct interface *ifp, int igmp_ver)
igmp->interface->name, query_buf, igmp->interface->name, query_buf,
sizeof(query_buf), 0 /* num_sources */, sizeof(query_buf), 0 /* num_sources */,
dst_addr, group_addr, dst_addr, group_addr,
pim_ifp->igmp_query_max_response_time_dsec, pim_ifp->gm_query_max_response_time_dsec,
1 /* s_flag: always set for general queries */, 1 /* s_flag: always set for general queries */,
igmp->querier_robustness_variable, igmp->querier_robustness_variable,
igmp->querier_query_interval); igmp->querier_query_interval);

View File

@ -65,12 +65,12 @@ static inline long igmp_gmi_msec(struct gm_group *group)
long qrv = 0, qqi = 0; 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->gm_socket_list, sock_node, igmp)) {
qrv = MAX(qrv, igmp->querier_robustness_variable); qrv = MAX(qrv, igmp->querier_robustness_variable);
qqi = MAX(qqi, igmp->querier_query_interval); qqi = MAX(qqi, igmp->querier_query_interval);
} }
return PIM_IGMP_GMI_MSEC(qrv, qqi, return PIM_IGMP_GMI_MSEC(qrv, qqi,
pim_ifp->igmp_query_max_response_time_dsec); pim_ifp->gm_query_max_response_time_dsec);
} }
void igmp_group_reset_gmi(struct gm_group *group) void igmp_group_reset_gmi(struct gm_group *group)
@ -984,12 +984,12 @@ static void igmp_send_query_group(struct gm_group *group, char *query_buf,
struct gm_sock *igmp; struct gm_sock *igmp;
struct listnode *sock_node; struct listnode *sock_node;
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node, igmp)) {
igmp_send_query( igmp_send_query(
pim_ifp->igmp_version, group, igmp->fd, ifp->name, pim_ifp->igmp_version, group, igmp->fd, ifp->name,
query_buf, query_buf_size, num_sources, query_buf, query_buf_size, num_sources,
group->group_addr, group->group_addr, group->group_addr, group->group_addr,
pim_ifp->igmp_specific_query_max_response_time_dsec, pim_ifp->gm_specific_query_max_response_time_dsec,
s_flag, igmp->querier_robustness_variable, s_flag, igmp->querier_robustness_variable,
igmp->querier_query_interval); igmp->querier_query_interval);
} }
@ -1021,8 +1021,8 @@ static void group_retransmit_group(struct gm_group *group)
char query_buf[query_buf_size]; char query_buf[query_buf_size];
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_msec = 100 * pim_ifp->gm_specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec; lmqt_msec = lmqc * lmqi_msec;
/* /*
@ -1091,8 +1091,8 @@ static int group_retransmit_sources(struct gm_group *group,
pim_ifp = group->interface->info; pim_ifp = group->interface->info;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_msec = 100 * pim_ifp->gm_specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec; lmqt_msec = lmqc * lmqi_msec;
/* Scan all group sources */ /* Scan all group sources */
@ -1283,7 +1283,7 @@ static void group_retransmit_timer_on(struct gm_group *group)
pim_ifp = group->interface->info; pim_ifp = group->interface->info;
lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_msec = 100 * pim_ifp->gm_specific_query_max_response_time_dsec;
if (PIM_DEBUG_IGMP_TRACE) { if (PIM_DEBUG_IGMP_TRACE) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
@ -1319,7 +1319,7 @@ static void group_query_send(struct gm_group *group)
long lmqc; /* Last Member Query Count */ long lmqc; /* Last Member Query Count */
pim_ifp = group->interface->info; pim_ifp = group->interface->info;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
/* lower group timer to lmqt */ /* lower group timer to lmqt */
igmp_group_timer_lower_to_lmqt(group); igmp_group_timer_lower_to_lmqt(group);
@ -1352,8 +1352,8 @@ static void source_query_send_by_flag(struct gm_group *group,
pim_ifp = group->interface->info; pim_ifp = group->interface->info;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
lmqi_msec = 100 * pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_msec = 100 * pim_ifp->gm_specific_query_max_response_time_dsec;
lmqt_msec = lmqc * lmqi_msec; lmqt_msec = lmqc * lmqi_msec;
/* /*
@ -1509,8 +1509,8 @@ void igmp_group_timer_lower_to_lmqt(struct gm_group *group)
pim_ifp = ifp->info; pim_ifp = ifp->info;
ifname = ifp->name; ifname = ifp->name;
lmqi_dsec = pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_dsec = pim_ifp->gm_specific_query_max_response_time_dsec;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
lmqt_msec = PIM_IGMP_LMQT_MSEC( lmqt_msec = PIM_IGMP_LMQT_MSEC(
lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */ lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */
@ -1544,8 +1544,8 @@ void igmp_source_timer_lower_to_lmqt(struct gm_source *source)
pim_ifp = ifp->info; pim_ifp = ifp->info;
ifname = ifp->name; ifname = ifp->name;
lmqi_dsec = pim_ifp->igmp_specific_query_max_response_time_dsec; lmqi_dsec = pim_ifp->gm_specific_query_max_response_time_dsec;
lmqc = pim_ifp->igmp_last_member_query_count; lmqc = pim_ifp->gm_last_member_query_count;
lmqt_msec = PIM_IGMP_LMQT_MSEC( lmqt_msec = PIM_IGMP_LMQT_MSEC(
lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */ lmqi_dsec, lmqc); /* lmqt_msec = (100 * lmqi_dsec) * lmqc */
@ -1717,7 +1717,7 @@ void igmp_v3_recv_query(struct gm_sock *igmp, const char *from_str,
resv_s_qrv = igmp_msg[8]; resv_s_qrv = igmp_msg[8];
qrv = 7 & resv_s_qrv; qrv = 7 & resv_s_qrv;
igmp->querier_robustness_variable = igmp->querier_robustness_variable =
qrv ? qrv : pim_ifp->igmp_default_robustness_variable; qrv ? qrv : pim_ifp->gm_default_robustness_variable;
/* /*
* RFC 3376: 4.1.7. QQIC (Querier's Query Interval Code) * RFC 3376: 4.1.7. QQIC (Querier's Query Interval Code)
@ -1734,7 +1734,7 @@ void igmp_v3_recv_query(struct gm_sock *igmp, const char *from_str,
qqic = igmp_msg[9]; qqic = igmp_msg[9];
qqi = igmp_msg_decode8to16(qqic); qqi = igmp_msg_decode8to16(qqic);
igmp->querier_query_interval = igmp->querier_query_interval =
qqi ? qqi : pim_ifp->igmp_default_query_interval; qqi ? qqi : pim_ifp->gm_default_query_interval;
if (PIM_DEBUG_IGMP_TRACE) { if (PIM_DEBUG_IGMP_TRACE) {
char ifaddr_str[INET_ADDRSTRLEN]; char ifaddr_str[INET_ADDRSTRLEN];

View File

@ -626,7 +626,8 @@ static int pim_mroute_msg(struct pim_instance *pim, const char *buf,
pim_ifp = ifp->info; pim_ifp = ifp->info;
ifaddr = connected_src->u.prefix4; ifaddr = connected_src->u.prefix4;
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, ifaddr); igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->gm_socket_list,
ifaddr);
if (PIM_DEBUG_IGMP_PACKETS) { if (PIM_DEBUG_IGMP_PACKETS) {
zlog_debug( zlog_debug(

View File

@ -86,7 +86,7 @@ static void pim_if_membership_refresh(struct interface *ifp)
*/ */
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, grp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode, grp)) {
struct listnode *srcnode; struct listnode *srcnode;
struct gm_source *src; struct gm_source *src;
@ -384,13 +384,13 @@ static void igmp_sock_query_interval_reconfig(struct gm_sock *igmp)
sizeof(ifaddr_str)); sizeof(ifaddr_str));
zlog_debug("%s: Querier %s on %s reconfig query_interval=%d", zlog_debug("%s: Querier %s on %s reconfig query_interval=%d",
__func__, ifaddr_str, ifp->name, __func__, ifaddr_str, ifp->name,
pim_ifp->igmp_default_query_interval); pim_ifp->gm_default_query_interval);
} }
/* /*
* igmp_startup_mode_on() will reset QQI: * igmp_startup_mode_on() will reset QQI:
* igmp->querier_query_interval = pim_ifp->igmp_default_query_interval; * igmp->querier_query_interval = pim_ifp->gm_default_query_interval;
*/ */
igmp_startup_mode_on(igmp); igmp_startup_mode_on(igmp);
} }
@ -430,9 +430,9 @@ static void change_query_interval(struct pim_interface *pim_ifp,
struct listnode *sock_node; struct listnode *sock_node;
struct gm_sock *igmp; struct gm_sock *igmp;
pim_ifp->igmp_default_query_interval = query_interval; pim_ifp->gm_default_query_interval = query_interval;
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node, igmp)) {
igmp_sock_query_interval_reconfig(igmp); igmp_sock_query_interval_reconfig(igmp);
igmp_sock_query_reschedule(igmp); igmp_sock_query_reschedule(igmp);
} }
@ -446,12 +446,11 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
struct listnode *grp_node; struct listnode *grp_node;
struct gm_group *grp; struct gm_group *grp;
if (pim_ifp->igmp_query_max_response_time_dsec if (pim_ifp->gm_query_max_response_time_dsec ==
== query_max_response_time_dsec) query_max_response_time_dsec)
return; return;
pim_ifp->igmp_query_max_response_time_dsec = pim_ifp->gm_query_max_response_time_dsec = query_max_response_time_dsec;
query_max_response_time_dsec;
/* /*
* Below we modify socket/group/source timers in order to quickly * Below we modify socket/group/source timers in order to quickly
@ -460,13 +459,13 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
*/ */
/* scan all sockets */ /* scan all sockets */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_socket_list, sock_node, igmp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_socket_list, sock_node, igmp)) {
/* reschedule socket general query */ /* reschedule socket general query */
igmp_sock_query_reschedule(igmp); igmp_sock_query_reschedule(igmp);
} }
/* scan socket groups */ /* scan socket groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grp_node, grp)) { for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grp_node, grp)) {
struct listnode *src_node; struct listnode *src_node;
struct gm_source *src; struct gm_source *src;
@ -2690,7 +2689,7 @@ int lib_interface_igmp_last_member_query_interval_modify(
pim_ifp = ifp->info; pim_ifp = ifp->info;
last_member_query_interval = last_member_query_interval =
yang_dnode_get_uint16(args->dnode, NULL); yang_dnode_get_uint16(args->dnode, NULL);
pim_ifp->igmp_specific_query_max_response_time_dsec = pim_ifp->gm_specific_query_max_response_time_dsec =
last_member_query_interval; last_member_query_interval;
break; break;
@ -2717,9 +2716,9 @@ int lib_interface_igmp_robustness_variable_modify(
case NB_EV_APPLY: case NB_EV_APPLY:
ifp = nb_running_get_entry(args->dnode, NULL, true); ifp = nb_running_get_entry(args->dnode, NULL, true);
pim_ifp = ifp->info; pim_ifp = ifp->info;
last_member_query_count = yang_dnode_get_uint8(args->dnode, last_member_query_count =
NULL); yang_dnode_get_uint8(args->dnode, NULL);
pim_ifp->igmp_last_member_query_count = last_member_query_count; pim_ifp->gm_last_member_query_count = last_member_query_count;
break; break;
} }

View File

@ -366,47 +366,47 @@ int pim_interface_config_write(struct vty *vty)
} }
/* IF ip igmp query-max-response-time */ /* IF ip igmp query-max-response-time */
if (pim_ifp->igmp_query_max_response_time_dsec if (pim_ifp->gm_query_max_response_time_dsec !=
!= IGMP_QUERY_MAX_RESPONSE_TIME_DSEC) { IGMP_QUERY_MAX_RESPONSE_TIME_DSEC) {
vty_out(vty, vty_out(vty,
" ip igmp query-max-response-time %d\n", " ip igmp query-max-response-time %d\n",
pim_ifp->igmp_query_max_response_time_dsec); pim_ifp->gm_query_max_response_time_dsec);
++writes; ++writes;
} }
/* IF ip igmp query-interval */ /* IF ip igmp query-interval */
if (pim_ifp->igmp_default_query_interval if (pim_ifp->gm_default_query_interval !=
!= IGMP_GENERAL_QUERY_INTERVAL) { IGMP_GENERAL_QUERY_INTERVAL) {
vty_out(vty, vty_out(vty,
" ip igmp query-interval %d\n", " ip igmp query-interval %d\n",
pim_ifp->igmp_default_query_interval); pim_ifp->gm_default_query_interval);
++writes; ++writes;
} }
/* IF ip igmp last-member_query-count */ /* IF ip igmp last-member_query-count */
if (pim_ifp->igmp_last_member_query_count if (pim_ifp->gm_last_member_query_count !=
!= IGMP_DEFAULT_ROBUSTNESS_VARIABLE) { IGMP_DEFAULT_ROBUSTNESS_VARIABLE) {
vty_out(vty, vty_out(vty,
" ip igmp last-member-query-count %d\n", " ip igmp last-member-query-count %d\n",
pim_ifp->igmp_last_member_query_count); pim_ifp->gm_last_member_query_count);
++writes; ++writes;
} }
/* IF ip igmp last-member_query-interval */ /* IF ip igmp last-member_query-interval */
if (pim_ifp->igmp_specific_query_max_response_time_dsec if (pim_ifp->gm_specific_query_max_response_time_dsec !=
!= IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC) { IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC) {
vty_out(vty, vty_out(vty,
" ip igmp last-member-query-interval %d\n", " ip igmp last-member-query-interval %d\n",
pim_ifp->igmp_specific_query_max_response_time_dsec); pim_ifp->gm_specific_query_max_response_time_dsec);
++writes; ++writes;
} }
/* IF ip igmp join */ /* IF ip igmp join */
if (pim_ifp->igmp_join_list) { if (pim_ifp->gm_join_list) {
struct listnode *node; struct listnode *node;
struct gm_join *ij; struct gm_join *ij;
for (ALL_LIST_ELEMENTS_RO( for (ALL_LIST_ELEMENTS_RO(
pim_ifp->igmp_join_list, pim_ifp->gm_join_list,
node, ij)) { node, ij)) {
char group_str[INET_ADDRSTRLEN]; char group_str[INET_ADDRSTRLEN];
char source_str char source_str

View File

@ -554,7 +554,7 @@ void igmp_source_forward_reevaluate_all(struct pim_instance *pim)
continue; continue;
/* scan igmp groups */ /* scan igmp groups */
for (ALL_LIST_ELEMENTS_RO(pim_ifp->igmp_group_list, grpnode, for (ALL_LIST_ELEMENTS_RO(pim_ifp->gm_group_list, grpnode,
grp)) { grp)) {
struct listnode *srcnode; struct listnode *srcnode;
struct gm_source *src; struct gm_source *src;