From: Justin Pettit Date: Mon, 30 Jun 2008 23:00:25 +0000 (-0700) Subject: Don't allow adding a flow entry with an output port of OFPP_NONE. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94998b6261ace36235e20425a1db368bd8fcc9cd;p=openvswitch Don't allow adding a flow entry with an output port of OFPP_NONE. --- diff --git a/switch/datapath.c b/switch/datapath.c index 12bb7144..4c4aa860 100644 --- a/switch/datapath.c +++ b/switch/datapath.c @@ -1085,7 +1085,8 @@ add_flow(struct datapath *dp, const struct ofp_flow_mod *ofm) const struct ofp_action *a = &ofm->actions[i]; if (a->type == htons(OFPAT_OUTPUT) - && a->arg.output.port == htons(OFPP_TABLE)) { + && (a->arg.output.port == htons(OFPP_TABLE) + || a->arg.output.port == htons(OFPP_NONE))) { /* xxx Send fancy new error message? */ goto error; }