ofproto-dpif-upcall: ofproto_dpif_send_packet_in() needs object on heap.
fix a bug introduced by commit
e1ec7dd46 (ofproto-dpif: Implement
multi-threaded miss handling.), in which execute_flow_miss() passes a
stack-allocated object to ofproto_dpif_send_packet_in() whereas that
function requires a heap-allocated object. Also fixes two related bugs:
the 'packet' previously used in the packet-in was invalid and its data
was not copied with xmemdup().
Previously, when there were multiple packets in a single flow miss,
execute_flow_miss() would only send the first one to the controller. This
was intentional (the goal is to find out whether the controller is
operational, and sending a single packet is sufficient for that) but
possibly confusing to the reader. This commit switches to sending all of
the packets (the common case is a single packet anyhow).
Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>