Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Teamdmgrd]Fix "teamd cannot start when port channel was down before warm reboot" issue #1171

Merged
merged 5 commits into from
Jan 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cfgmgr/teammgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,19 @@ task_process_status TeamMgr::addLag(const string &alias, int min_links, bool fal
while (getline(aliasfile, line))
{
ifstream memberfile(dump_path + line, ios::binary);
uint8_t mac_temp[ETHER_ADDR_LEN];
uint8_t mac_temp[ETHER_ADDR_LEN] = {0};
uint8_t null_mac[ETHER_ADDR_LEN] = {0};

if (!memberfile.is_open())
continue;

memberfile.seekg(partner_system_id_offset, std::ios::beg);
memberfile.read(reinterpret_cast<char*>(mac_temp), ETHER_ADDR_LEN);

/* During negotiation stage partner info of pdu is empty , skip it */
if (memcmp(mac_temp, null_mac, ETHER_ADDR_LEN) == 0)
continue;

mac_boot = MacAddress(mac_temp);
break;
}
Expand Down