the line "else if (filter_mode == EXCLUDE_MODE || filter_mode == EXCLUDE_MODE)" has an repeated expression and will lead to mld message with source specific multicast send failed. So it should be "else if (filter_mode == EXCLUDE_MODE || filter_mode == INCLUDE_MODE)" .