Skip to content

Commit

Permalink
portsyncd: Bring up the LAG using ifup command (sonic-net#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng committed Jan 12, 2017
1 parent 1bd4240 commit e568342
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion portsyncd/linksync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ using namespace swss;
#define VLAN_DRV_NAME "bridge"
#define TEAM_DRV_NAME "team"

#define DEFAULT_LAG_INTERFACES_FILE "/etc/network/interfaces.d/lag_interfaces"

const string INTFS_PREFIX = "Ethernet";
const string VLAN_PREFIX = "Vlan";
const string LAG_PREFIX = "PortChannel";
Expand Down Expand Up @@ -120,9 +122,12 @@ void LinkSync::onMsg(int nlmsg_type, struct nl_object *obj)
/* Insert or update the ifindex to key map */
m_ifindexNameMap[ifindex] = key;

/* Will be dealt by teamsyncd */
/* LAG (PortChannel) */
if (type && !strcmp(type, TEAM_DRV_NAME))
{
/* Bring up the LAG */
if (system(("/sbin/ifup --force -i " + string(DEFAULT_LAG_INTERFACES_FILE) + " " + key).c_str()))
;
return;
}

Expand Down

0 comments on commit e568342

Please sign in to comment.