From: Ben Pfaff Date: Thu, 17 Feb 2011 23:04:44 +0000 (-0800) Subject: ofproto: Fix behavior when special_cb not present (as with ovs-openflowd). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7ae75a3839af2ae0803af66e51cc93cf36603c;p=openvswitch ofproto: Fix behavior when special_cb not present (as with ovs-openflowd). The special_cb hook allows ofproto's client to intercept packets. When it is not present (as in ovs-openflowd), no packets need to be intercepted, but ofproto implemented the opposite behavior. This fixes the problem. Reported-by: kk yap --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 39d34573..e4c3528a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3134,9 +3134,9 @@ xlate_actions(struct action_xlate_ctx *ctx, ctx->last_pop_priority = -1; if (!ctx->check_special - || (ctx->ofproto->ofhooks->special_cb - && ctx->ofproto->ofhooks->special_cb(&ctx->flow, ctx->packet, - ctx->ofproto->aux))) { + || !ctx->ofproto->ofhooks->special_cb + || ctx->ofproto->ofhooks->special_cb(&ctx->flow, ctx->packet, + ctx->ofproto->aux)) { do_xlate_actions(in, n_in, ctx); } else { ctx->may_set_up_flow = false;