Skip to content

Commit

Permalink
Copy trap id on mirror (#484)
Browse files Browse the repository at this point in the history
* Tweaks to ip filtering

* fix
  • Loading branch information
DanG100 authored Oct 18, 2024
1 parent 9a31d1d commit e558846
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dataplane/saiserver/policer.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func (p *policer) CreatePolicer(ctx context.Context, req *saipb.CreatePolicerReq
action = &fwdpb.ActionDesc{
ActionType: fwdpb.ActionType_ACTION_TYPE_MIRROR,
Action: &fwdpb.ActionDesc_Mirror{Mirror: &fwdpb.MirrorActionDesc{
PortId: &fwdpb.PortId{ObjectId: &fwdpb.ObjectId{Id: fmt.Sprint(resp.GetAttr().GetCpuPort())}},
PortId: &fwdpb.PortId{ObjectId: &fwdpb.ObjectId{Id: fmt.Sprint(resp.GetAttr().GetCpuPort())}},
FieldIds: []*fwdpb.PacketFieldId{{
Field: &fwdpb.PacketField{FieldNum: fwdpb.PacketFieldNum_PACKET_FIELD_NUM_TRAP_ID},
}},
PortAction: fwdpb.PortAction_PORT_ACTION_OUTPUT,
}},
}
Expand Down

0 comments on commit e558846

Please sign in to comment.