wireshark: get correct discriminator value
diff --git a/wireshark_gen/templates/openflow.lua b/wireshark_gen/templates/openflow.lua
index 9b8ea11..120dfa3 100644
--- a/wireshark_gen/templates/openflow.lua
+++ b/wireshark_gen/templates/openflow.lua
@@ -78,7 +78,8 @@
 :: name = 'dissect_%s_v%d' % (ofclass.name, version)
 :: include('_ofclass_dissector.lua', name=name, ofclass=ofclass)
 :: if ofclass.superclass:
-:: discriminator_value = 0
+:: discriminator = ofproto.class_by_name(ofclass.superclass).discriminator
+:: discriminator_value = ofclass.member_by_name(discriminator.name).value
 ${ofclass.superclass}_v${version}_dissectors[${discriminator_value}] = ${name}
 
 :: #endif