aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp.c
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2018-10-04 11:05:35 +0200
committerNeale Ranns <nranns@cisco.com>2018-10-16 08:28:15 +0000
commit97748cae2e6261d8fdc7c331a4d82828ac51ed81 (patch)
tree503ec3556042aef7d0b1575baca06fd239d09828 /src/plugins/igmp/igmp.c
parent02a95ce8d53caeba07a3c027b12339f44f3093b8 (diff)
IGMP: proxy device
Create 'proxy device' per VRF and add one upstream and one or many downstream interfaces. Change-Id: I1cef05fb01e73a5b483c7a2f4debaaeffe2c8155 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/igmp/igmp.c')
-rw-r--r--src/plugins/igmp/igmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c
index 85ba35c31d6..61a9970af14 100644
--- a/src/plugins/igmp/igmp.c
+++ b/src/plugins/igmp/igmp.c
@@ -381,6 +381,7 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode)
hash_create_mem (0, sizeof (igmp_key_t), sizeof (uword));
config->robustness_var = IGMP_DEFAULT_ROBUSTNESS_VARIABLE;
config->mode = mode;
+ config->proxy_device_id = ~0;
for (ii = 0; ii < IGMP_CONFIG_N_TIMERS; ii++)
config->timers[ii] = IGMP_TIMER_ID_INVALID;
@@ -445,6 +446,18 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode)
mfib_table_entry_path_remove (mfib_index,
&mpfx_report,
MFIB_SOURCE_IGMP, &via_itf_path);
+
+ /*
+ * remove interface from proxy device
+ * if this device is upstream, delete proxy device
+ */
+ if (config->mode == IGMP_MODE_ROUTER)
+ igmp_proxy_device_add_del_interface (config->proxy_device_id,
+ config->sw_if_index, 0);
+ else if (config->mode == IGMP_MODE_HOST)
+ igmp_proxy_device_add_del (config->proxy_device_id,
+ config->sw_if_index, 0);
+
igmp_clear_config (config);
im->igmp_config_by_sw_if_index[config->sw_if_index] = ~0;
hash_free (config->igmp_group_by_key);