File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 31
31
#include " mclagsyncd/mclaglink.h"
32
32
#include " mclagsyncd/mclag.h"
33
33
#include < set>
34
+ #include < unordered_set>
34
35
#include < algorithm>
35
36
#include " macaddress.h"
36
37
#include < string>
@@ -188,8 +189,13 @@ void MclagLink::mclagsyncdFetchMclagInterfaceConfigFromConfigdb()
188
189
189
190
void MclagLink::setPortIsolate (char *msg)
190
191
{
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 ())
193
199
{
194
200
mclag_sub_option_hdr_t *op_hdr = NULL ;
195
201
string isolate_src_port;
Original file line number Diff line number Diff line change 50
50
#endif /* INET_ADDRSTRLEN */
51
51
52
52
#define MAX_L_PORT_NAME 20
53
+
53
54
#define BRCM_PLATFORM_SUBSTRING " broadcom"
55
+ #define BFN_PLATFORM_SUBSTRING " barefoot"
54
56
55
57
using namespace std ;
56
58
You can’t perform that action at this time.
0 commit comments