X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif.c;h=46902159bb130a5fa5274d06324d245347dfc59d;hb=6b900de4efd368be88ef3db88b1eff8f835a7cf7;hp=4e953f413696a2424cc34ccdab9d5122be974bfb;hpb=448a4b2fc74b9d3884f3702c4b8801eb0d443f10;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 4e953f413..46902159b 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -560,6 +560,8 @@ ofproto_dpif_flow_mod(struct ofproto_dpif *ofproto, ovs_mutex_unlock(&ofproto->flow_mod_mutex); } +/* Appends 'pin' to the queue of "packet ins" to be sent to the controller. + * Takes ownership of 'pin' and pin->packet. */ void ofproto_dpif_send_packet_in(struct ofproto_dpif *ofproto, struct ofputil_packet_in *pin) @@ -1418,7 +1420,7 @@ destruct(struct ofproto *ofproto_) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); struct rule_dpif *rule, *next_rule; - struct ofputil_flow_mod *pin, *next_pin; + struct ofputil_packet_in *pin, *next_pin; struct ofputil_flow_mod *fm, *next_fm; struct oftable *table; @@ -1455,7 +1457,7 @@ destruct(struct ofproto *ofproto_) LIST_FOR_EACH_SAFE (pin, next_pin, list_node, &ofproto->pins) { list_remove(&pin->list_node); ofproto->n_pins--; - free(pin->ofpacts); + free(CONST_CAST(void *, pin->packet)); free(pin); } ovs_mutex_unlock(&ofproto->pin_mutex);