ofproto: Correct encoding and decoding of group desc properties.
authorSimon Horman <simon.horman@netronome.com>
Fri, 16 Oct 2015 10:50:47 +0000 (19:50 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 16 Oct 2015 15:26:12 +0000 (08:26 -0700)
commit3986cae69621bd82a8945345f6345edc2407b9fd
tree9756ac9d9e051092cf52c6296ee21d47245bb0b5
parenteb6b08eb4ad85de001abf36be83301d71a20345a
ofproto: Correct encoding and decoding of group desc properties.

* encode: if properties are present include their length in
          value of the length field of the group desc
* decode: use the value of the length field to calculate the length of
          properties rather than assuming that the rest of the message
          is properties. This assumption is not correct as a message
          may contain multiple group descs.

Fixes: 18ac06d3546e ("ofp-util: Encoding and decoding of (draft) OpenFlow 1.5 group messages.")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-util.c
tests/ofp-print.at
tests/ofproto.at