Don't allow adding a flow entry with an output port of OFPP_NONE.
authorJustin Pettit <jpettit@nicira.com>
Mon, 30 Jun 2008 22:58:44 +0000 (15:58 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 1 Jul 2008 04:41:46 +0000 (21:41 -0700)
datapath/forward.c

index e0b07011fce42d6ba8deefc176ed7caff9ac6685..fcbc59b31e78df91939bf8b4f16a8e2048b453c9 100644 (file)
@@ -371,7 +371,8 @@ add_flow(struct sw_chain *chain, 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;
                }