ofp-errors: Use OFPERR_OFPBRC_BAD_PORT
authorSimon Horman <horms@verge.net.au>
Wed, 5 Sep 2012 02:50:37 +0000 (11:50 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 5 Sep 2012 17:19:03 +0000 (10:19 -0700)
commit2e1bfcb6315704b804add452ca6d1324dac5b45c
treecd4fcd27beda54fc272c02637f1df49a7f0046e8
parent55c2b94431412e6ffb2010bad230f68373109e07
ofp-errors: Use OFPERR_OFPBRC_BAD_PORT

* In the case of OpenFlow 1.2+ OFPERR_OFPBRC_BAD_PORT is defined
  in the specification and seems to be the most appropriate error
  to use when an invalid port is encountered in a Packet Out request.

* In the case of OpenFlow 1.0 and 1.1 no appropriate error message
  seems to exist. Perhaps because an invalid port is not possible?
  I'm unsure.

  In any case, make use of a non-standard error code (1,514).
  This was formerly known as OFPERR_NXBRC_BAD_IN_PORT but
  has been rolled into OFPERR_NXBRC_BAD_IN_PORT to allow the
  latter to be used without concern for the prevailing Open Flow version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-errors.h
lib/ofp-util.c
ofproto/ofproto-provider.h
ofproto/ofproto.c