ofputil: Accept OFPP_NONE as a valid output port.
authorEthan Jackson <ethan@nicira.com>
Thu, 10 May 2012 18:24:36 +0000 (11:24 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 10 May 2012 18:24:36 +0000 (11:24 -0700)
Ofproto-dpif treats an output to OFPP_NONE as a NOOP, but ofputil
treated it as an error.  The former behavior seems more natural.

Reported-by: Teemu Koponen <koponen@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/ofp-util.c

index 48be774..bd078c7 100644 (file)
@@ -3309,6 +3309,7 @@ ofputil_check_output_port(uint16_t port, int max_ports)
     case OFPP_FLOOD:
     case OFPP_ALL:
     case OFPP_CONTROLLER:
+    case OFPP_NONE:
     case OFPP_LOCAL:
         return 0;