> On Jan 6, 2018, at 10:33 AM, Ben Pfaff <[email protected]> wrote:
>
> /* Creates and returns an OpenFlow message of type OFPT_ERROR that conveys the
> diff --git a/ofproto/bundles.c b/ofproto/bundles.c
> index 849f99a15e40..195b9f90ef11 100644
> --- a/ofproto/bundles.c
> +++ b/ofproto/bundles.c
> @@ -51,13 +51,10 @@ ofp_bundle_create(uint32_t id, uint16_t flags, const
> struct ofp_header *oh)
> bundle->id = id;
> bundle->flags = flags;
> bundle->state = BS_OPEN;
> + bundle->msg = xmemdup(oh, ntohs(oh->length));
>
> ovs_list_init(&bundle->msg_list);
>
> return bundle;
> }
>
> @@ -71,6 +68,7 @@ ofp_bundle_remove__(struct ofconn *ofconn, struct
> ofp_bundle *bundle)
> }
>
> ofconn_remove_bundle(ofconn, bundle);
> + free(bundle->msg);
> free(bundle);
> }
There are two other places that free 'bundle' directly in the file, so you may
want to handle those as well.
> diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
> index 7f33fbddfe3f..ae53bfb04a83 100644
> --- a/ofproto/connmgr.c
> +++ b/ofproto/connmgr.c
> @@ -1256,7 +1256,7 @@ bundle_remove_expired(struct ofconn *ofconn, long long
> int now)
>
> HMAP_FOR_EACH_SAFE (b, next, node, &ofconn->bundles) {
> if (b->used <= limit) {
> - ofconn_send_error(ofconn, &b->ofp_msg, OFPERR_OFPBFC_TIMEOUT);
> + ofconn_send_error(ofconn, b->msg, OFPERR_OFPBFC_TIMEOUT);
The comment for ofconn_send_error() should be updated to indicate it's not
limited to 64 bytes anymore.
Acked-by: Justin Pettit <[email protected]>
This seems like it will be helpful. Thanks!
--Justin
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev