diff --git a/orchagent/neighorch.cpp b/orchagent/neighorch.cpp index 562793b5f7..d431fa02c0 100644 --- a/orchagent/neighorch.cpp +++ b/orchagent/neighorch.cpp @@ -912,15 +912,18 @@ bool NeighOrch::addNeighbor(const NeighborEntry &neighborEntry, const MacAddress } else if (isHwConfigured(neighborEntry)) { - status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbor_entry, &neighbor_attr); - if (status != SAI_STATUS_SUCCESS) + for (auto itr : neighbor_attrs) { - SWSS_LOG_ERROR("Failed to update neighbor %s on %s, rv:%d", - macAddress.to_string().c_str(), alias.c_str(), status); - task_process_status handle_status = handleSaiSetStatus(SAI_API_NEIGHBOR, status); - if (handle_status != task_success) + status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbor_entry, &itr); + if (status != SAI_STATUS_SUCCESS) { - return parseHandleSaiStatusFailure(handle_status); + SWSS_LOG_ERROR("Failed to update neighbor %s on %s, attr.id=0x%x, rv:%d", + macAddress.to_string().c_str(), alias.c_str(), itr.id, status); + task_process_status handle_status = handleSaiSetStatus(SAI_API_NEIGHBOR, status); + if (handle_status != task_success) + { + return parseHandleSaiStatusFailure(handle_status); + } } } SWSS_LOG_NOTICE("Updated neighbor %s on %s", macAddress.to_string().c_str(), alias.c_str());