diff options
author | Everton Marques <everton.marques@gmail.com> | 2014-09-30 19:14:19 -0300 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-02-04 06:08:02 +0100 |
commit | 24e3a9b5ff17553d20a2f9e4ce2a61b5012cd0f6 (patch) | |
tree | 6e2dc00ba0b41e56b9527182532e4460c119fd75 | |
parent | ddc6659dd0f05b304ef579dcee6ac803e1a4b6d2 (diff) | |
download | quagga-24e3a9b5ff17553d20a2f9e4ce2a61b5012cd0f6.tar.bz2 quagga-24e3a9b5ff17553d20a2f9e4ce2a61b5012cd0f6.tar.xz |
pimd: Report del_oif() failure within igmp_source_forward_stop().
-rw-r--r-- | pimd/pim_igmpv3.c | 4 | ||||
-rw-r--r-- | pimd/pim_zebra.c | 29 |
2 files changed, 23 insertions, 10 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index b95adb6f..3baddbfa 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -388,6 +388,10 @@ static void source_channel_oil_detach(struct igmp_source *source) } } +/* + igmp_source_delete: stop fowarding, and delete the source + igmp_source_forward_stop: stop fowarding, but keep the source +*/ void igmp_source_delete(struct igmp_source *source) { struct igmp_group *group; diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 68aee687..fbc7c16e 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -1073,6 +1073,7 @@ static int del_oif(struct channel_oil *channel_oil, 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 @@ void igmp_source_forward_start(struct igmp_source *source) } } - 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 @@ void igmp_source_forward_start(struct igmp_source *source) 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 @@ void igmp_source_forward_stop(struct igmp_source *source) 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 |