Skip to content

Commit

Permalink
orchagent: Adding LACP trap ID (sonic-net#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
stcheng committed Apr 26, 2016
1 parent 8bdbf73 commit 76e74e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ PortsOrch::PortsOrch(DBConnector *db, string tableName) :
SAI_HOSTIF_TRAP_ID_TTL_ERROR,
SAI_HOSTIF_TRAP_ID_ARP_REQUEST,
SAI_HOSTIF_TRAP_ID_ARP_RESPONSE,
SAI_HOSTIF_TRAP_ID_LLDP
SAI_HOSTIF_TRAP_ID_LLDP,
SAI_HOSTIF_TRAP_ID_LACP
};

for (i = 0; i < 4; i++)
int trap_length = sizeof(trap_ids)/sizeof(*trap_ids);

for (i = 0; i < trap_length; i++)
{
attr.id = SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION;
attr.value.s32 = SAI_PACKET_ACTION_TRAP;
Expand All @@ -60,7 +63,7 @@ PortsOrch::PortsOrch(DBConnector *db, string tableName) :
}
}

for (i = 0; i < 4; i++)
for (i = 0; i < trap_length; i++)
{
attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_CHANNEL;
attr.value.s32 = SAI_HOSTIF_TRAP_CHANNEL_NETDEV;
Expand Down

0 comments on commit 76e74e0

Please sign in to comment.