- if (rc_t::OK != m_hw.rc()) {
- /*
- * route not yet installed. install each of the desired paths
- */
- m_paths = r.m_paths;
-
- for (auto& p : m_paths)
- HW::enqueue(
- new ip_route_cmds::update_cmd(m_hw, m_rd->table_id(), m_prefix, p));
- } else {
- /*
- * add each path that is not installed yet and remove each that is no longer
- * wanted
- */
- path_list_t to_add;
- set_difference(r.m_paths.begin(), r.m_paths.end(), m_paths.begin(),
- m_paths.end(), std::inserter(to_add, to_add.begin()));
-
- for (auto& p : to_add)
- HW::enqueue(
- new ip_route_cmds::update_cmd(m_hw, m_rd->table_id(), m_prefix, p));
-
- path_list_t to_del;
- set_difference(m_paths.begin(), m_paths.end(), r.m_paths.begin(),
- r.m_paths.end(), std::inserter(to_del, to_del.begin()));
-
- for (auto& p : to_del)
- HW::enqueue(
- new ip_route_cmds::delete_cmd(m_hw, m_rd->table_id(), m_prefix, p));
-
- m_paths = r.m_paths;
- }
+ m_paths = r.m_paths;
+ HW::enqueue(
+ new ip_route_cmds::update_cmd(m_hw, m_rd->table_id(), m_prefix, m_paths));