From a3f2205a6b53d6e942285bc255ca2d8ba8b69bdb Mon Sep 17 00:00:00 2001 From: shun159 Date: Wed, 19 Aug 2015 14:46:22 +0900 Subject: [PATCH] Fix bug, TableFeatures encode error --- src/ofp_v4_encode.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ofp_v4_encode.erl b/src/ofp_v4_encode.erl index 50a1ffa..a71d6ca 100644 --- a/src/ofp_v4_encode.erl +++ b/src/ofp_v4_encode.erl @@ -1037,6 +1037,10 @@ table_feature_prop_action_id(Id) when is_atom(Id) -> table_feature_prop_field_id({experimenter, Id}) when is_integer(Id) -> ExperimenterInt = ofp_v4_enum:to_int(oxm_class, experimenter), <>; +table_feature_prop_field_id({Class, Id}) when is_atom(Class), + is_integer(Id) -> + ClassInt = ofp_v4_enum:to_int(oxm_class, Class), + <>; table_feature_prop_field_id(Id) when is_atom(Id) -> ClassInt = ofp_v4_enum:to_int(oxm_class, openflow_basic), IdInt = ofp_v4_enum:to_int(oxm_ofb_match_fields, Id), @@ -1181,5 +1185,3 @@ type_int(#ofp_set_async{}) -> ofp_v4_enum:to_int(type, set_async); type_int(#ofp_meter_mod{}) -> ofp_v4_enum:to_int(type, meter_mod). - -