On Thu, Jul 03, 2014 at 12:29:25PM +1200, Joe Stringer wrote: > Change the interface to allow implementations to pass back a buffer, and > allow callers to specify which of actions, mask, and stats they wish to > receive. This will be used in the next commit. > > Signed-off-by: Joe Stringer <joestrin...@nicira.com>
I think that dpif_flow_get() should set *bufp to NULL before it calls ->flow_get. Otherwise I think that the error case could end up freeing an indeterminate pointer in some cases, e.g. what if dpif_netdev_flow_get() returns the error obtained from dpif_netdev_flow_from_nlattrs()? I think that dpif_netdev_flow_get() has a couple of bugs. First, if the actions are big enough that they expand the ofpbuf, and a caller asks for the mask also, then adding the actions will invalidate *maskp and *mask_len. Second, ofpbuf_put() should be used instead of ofpbuf_push(), otherwise the actions will *always* invalidate the mask ;-( Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev