[ovs-dev] [PATCH] lib/dpif-netdev.c: Fix the flow in_port bound checking

Alex Wang alexw at nicira.com
Thu May 23 04:27:29 UTC 2013


This commit fixes the flow in_port bound checking in the function
"dpif_netdev_flow_from_nlattrs()".

Signed-off-by: Alex Wang <alexw at nicira.com>
---
 lib/dpif-netdev.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 4ad2823..4893833 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -701,9 +701,7 @@ dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len,
         return EINVAL;
     }
 
-    if (flow->in_port < OFPP_MAX
-        ? flow->in_port >= MAX_PORTS
-        : flow->in_port != OFPP_LOCAL && flow->in_port != OFPP_NONE) {
+    if (flow->in_port >= MAX_PORTS) {
         return EINVAL;
     }
 
-- 
1.7.9.5




More information about the dev mailing list