File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131#include " mclagsyncd/mclaglink.h"
3232#include " mclagsyncd/mclag.h"
3333#include < set>
34+ #include < unordered_set>
3435#include < algorithm>
3536#include " macaddress.h"
3637#include < string>
@@ -188,8 +189,13 @@ void MclagLink::mclagsyncdFetchMclagInterfaceConfigFromConfigdb()
188189
189190void MclagLink::setPortIsolate (char *msg)
190191{
191- char *platform = getenv (" platform" );
192- if ((NULL != platform) && (strstr (platform, BRCM_PLATFORM_SUBSTRING)))
192+ static const unordered_set<string> supported {
193+ BRCM_PLATFORM_SUBSTRING,
194+ BFN_PLATFORM_SUBSTRING
195+ };
196+
197+ const char *platform = getenv (" platform" );
198+ if (platform != nullptr && supported.find (string (platform)) != supported.end ())
193199 {
194200 mclag_sub_option_hdr_t *op_hdr = NULL ;
195201 string isolate_src_port;
Original file line number Diff line number Diff line change 5050#endif /* INET_ADDRSTRLEN */
5151
5252#define MAX_L_PORT_NAME 20
53+
5354#define BRCM_PLATFORM_SUBSTRING " broadcom"
55+ #define BFN_PLATFORM_SUBSTRING " barefoot"
5456
5557using namespace std ;
5658
You can’t perform that action at this time.
0 commit comments