From 0958f12880427e4f3ea3fcc758a3ddf681ae6f5d Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 12 Nov 2012 18:57:42 -0800 Subject: [PATCH] ofproto-dpif: Correct in_port on send_packet(). 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 --- ofproto/ofproto-dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index fe0aae3b..098a43ee 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5176,7 +5176,7 @@ send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) 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) { -- 2.30.2