diff --git a/bin/enum_gen b/bin/enum_gen index f74b013..1d28df9 100755 Binary files a/bin/enum_gen and b/bin/enum_gen differ diff --git a/test/ofp_action_test.exs b/test/ofp_action_test.exs index 146b27d..616cfc8 100644 --- a/test/ofp_action_test.exs +++ b/test/ofp_action_test.exs @@ -626,5 +626,22 @@ defmodule OfpActionTest do assert actions_bin == packet assert actions == [resubmit_table_ct] end + + test "with clone(push_vlan:0x8100,set_field:5->vlan_vid,output:10)" do + test_file = "test/packet_data/nx_clone.raw" + packet = File.read!(test_file) + actions = Openflow.Action.read(packet) + clone = + Openflow.Action.NxClone.new( + [ + Openflow.Action.PushVlan.new(), + Openflow.Action.SetField.new({:vlan_vid, 5}), + Openflow.Action.Output.new(10) + ] + ) + actions_bin = Openflow.Action.to_binary(clone) + assert actions_bin == packet + assert actions == [clone] + end end end diff --git a/test/packet_data/nx_clone.raw b/test/packet_data/nx_clone.raw index 47e62dd..2af69bc 100644 Binary files a/test/packet_data/nx_clone.raw and b/test/packet_data/nx_clone.raw differ