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

index 12bb714469954605db10068eb4b8c2ebd5a90055..4c4aa8606ba14c83b7a1772f57ce558dcc3b772d 100644 (file)
@@ -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;
         }