The switch to a single datapath uncovered a long-standing bug in the
send_packet() function. The code had used an (invalid) ingress OpenFlow
port of 0, which happened to get translated to the datapath's local
port, which was always 0. With the single datapath, this invalid
OpenFlow port number no longer maps properly, so switch-generated
packets could not be transmitted. This patch properly sets the ingress
port to OFPP_LOCAL.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
struct flow flow;
int error;
- flow_extract(packet, 0, NULL, 0, &flow);
+ flow_extract(packet, 0, NULL, OFPP_LOCAL, &flow);
odp_port = vsp_realdev_to_vlandev(ofproto, ofport->odp_port,
flow.vlan_tci);
if (odp_port != ofport->odp_port) {