pimd: Report del_oif() failure within igmp_source_forward_stop().
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 68aee68..fbc7c16 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -1073,6 +1073,7 @@
void igmp_source_forward_start(struct igmp_source *source)
{
struct igmp_group *group;
+ int result;
if (PIM_DEBUG_IGMP_TRACE) {
char source_str[100];
@@ -1158,9 +1159,12 @@
}
}
- if (add_oif(source->source_channel_oil,
- group->group_igmp_sock->interface,
- PIM_OIF_FLAG_PROTO_IGMP)) {
+ result = add_oif(source->source_channel_oil,
+ group->group_igmp_sock->interface,
+ PIM_OIF_FLAG_PROTO_IGMP);
+ if (result) {
+ zlog_warn("%s: add_oif() failed with return=%d",
+ __func__, result);
return;
}
@@ -1174,9 +1178,14 @@
IGMP_SOURCE_DO_FORWARDING(source->source_flags);
}
+/*
+ igmp_source_forward_stop: stop fowarding, but keep the source
+ igmp_source_delete: stop fowarding, and delete the source
+ */
void igmp_source_forward_stop(struct igmp_source *source)
{
struct igmp_group *group;
+ int result;
if (PIM_DEBUG_IGMP_TRACE) {
char source_str[100];
@@ -1210,14 +1219,14 @@
fixes the issue without ill effect, similar to
pim_forward_stop below.
*/
- /*if (del_oif(source->source_channel_oil,
- group->group_igmp_sock->interface,
- PIM_OIF_FLAG_PROTO_IGMP)) {
+ result = del_oif(source->source_channel_oil,
+ group->group_igmp_sock->interface,
+ PIM_OIF_FLAG_PROTO_IGMP);
+ if (result) {
+ zlog_warn("%s: del_oif() failed with return=%d",
+ __func__, result);
return;
- }*/
- del_oif(source->source_channel_oil,
- group->group_igmp_sock->interface,
- PIM_OIF_FLAG_PROTO_IGMP);
+ }
/*
Feed IGMPv3-gathered local membership information into PIM