Skip to content
Open
Show file tree
Hide file tree
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
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