Skip to content

Commit

Permalink
Merge branch 'Azure:master' into fix/mclagsyncd-out-of-order-initiali…
Browse files Browse the repository at this point in the history
…zation
  • Loading branch information
novikauanton authored Jan 14, 2022
2 parents b04979d + c1b4b40 commit 86c14e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mclagsyncd/mclaglink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "mclagsyncd/mclaglink.h"
#include "mclagsyncd/mclag.h"
#include <set>
#include <unordered_set>
#include <algorithm>
#include "macaddress.h"
#include <string>
Expand Down Expand Up @@ -188,8 +189,13 @@ void MclagLink::mclagsyncdFetchMclagInterfaceConfigFromConfigdb()

void MclagLink::setPortIsolate(char *msg)
{
char *platform = getenv("platform");
if ((NULL != platform) && (strstr(platform, BRCM_PLATFORM_SUBSTRING)))
static const unordered_set<string> supported {
BRCM_PLATFORM_SUBSTRING,
BFN_PLATFORM_SUBSTRING
};

const char *platform = getenv("platform");
if (platform != nullptr && supported.find(string(platform)) != supported.end())
{
mclag_sub_option_hdr_t *op_hdr = NULL;
string isolate_src_port;
Expand Down
2 changes: 2 additions & 0 deletions mclagsyncd/mclaglink.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
#endif /* INET_ADDRSTRLEN */

#define MAX_L_PORT_NAME 20

#define BRCM_PLATFORM_SUBSTRING "broadcom"
#define BFN_PLATFORM_SUBSTRING "barefoot"

using namespace std;

Expand Down

0 comments on commit 86c14e5

Please sign in to comment.