From 6c24d40243cffe9096431a3ad53a7acfd236d001 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 29 Sep 2011 13:30:07 -0700 Subject: [PATCH] ofp-util: make_packet_out() shouldn't receive OVSP_NONE. make_packet_out() operates solely at the OpenFlow layer, so it should never receive OVSP_LOCAL as an in_port. This function is used only by the learning switch, which will never generate a packet with OVSP_LOCAL so this fixes not a bug but a violation of semantics. --- lib/ofp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 5f7937f6..52a996a5 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1868,7 +1868,7 @@ make_packet_out(const struct ofpbuf *packet, uint32_t buffer_id, opo->header.length = htons(size); opo->header.xid = htonl(0); opo->buffer_id = htonl(buffer_id); - opo->in_port = htons(in_port == OVSP_LOCAL ? OFPP_LOCAL : in_port); + opo->in_port = htons(in_port); opo->actions_len = htons(actions_len); ofpbuf_put(out, actions, actions_len); if (packet) { -- 2.30.2