From e1154f713ec8f47ff38979d76e9456b49b0bc264 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Sep 2011 11:25:29 -0700 Subject: ofproto: Reject invalid input ports in OFPT_PACKET_OUT requests. Some invalid ports (those above the maximum port number supported by the datapath, including OpenFlow reserved ports that are not translated by OVS into some other number) will be rejected by the datapath. It's better to catch these early and send back an appropriate OpenFlow error code, rather than to just get EINVAL from the kernel and have to guess at the problem. Reported-by: Aaron Rosen --- include/openflow/nicira-ext.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index 84060d79..875052a9 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -110,6 +110,9 @@ enum nx_bad_request_code { /* NXT_ROLE_REQUEST specified an invalid role. */ NXBRC_BAD_ROLE = 0x201, + + /* The in_port in an ofp_packet_out request is invalid. */ + NXBRC_BAD_IN_PORT = 0x202 }; /* Additional "code" values for OFPET_FLOW_MOD_FAILED. */ -- cgit v1.2.3