ofp-actions: Fix error code for invalid table id.
authorSelvamuthukumar <smkumar@merunetworks.com>
Wed, 24 Sep 2014 16:53:13 +0000 (09:53 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 24 Sep 2014 17:16:54 +0000 (10:16 -0700)
Send OFPET_BAD_INSTRUCTION/OFPBIC_BAD_TABLE_ID if table is invalid
in goto table instruction.

Signed-off-by: Selvamuthukumar <smkumar@merunetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-actions.c
tests/ofp-actions.at
tests/ofproto.at

index cc1f9a0..ea47ff9 100644 (file)
@@ -2125,7 +2125,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,
         uint8_t goto_table = ofpact_get_GOTO_TABLE(a)->table_id;
         if ((table_id != 255 && goto_table <= table_id)
             || (n_tables != 255 && goto_table >= n_tables)) {
-            return OFPERR_OFPBRC_BAD_TABLE_ID;
+            return OFPERR_OFPBIC_BAD_TABLE_ID;
         }
         return 0;
     }
index 452bdbf..c82133c 100644 (file)
@@ -357,7 +357,7 @@ dnl Goto-Table 1 instruction non-zero padding
 0001 0008 01 000001
 
 dnl Goto-Table 1 instruction go back to the previous table.
-# bad OF1.1 instructions: OFPBRC_BAD_TABLE_ID
+# bad OF1.1 instructions: OFPBIC_BAD_TABLE_ID
 2,0001 0008 01 000000
 
 dnl Goto-Table 1
index f14cbcc..83effeb 100644 (file)
@@ -600,7 +600,7 @@ AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:2])
 # but at least it's the same code in ofpacts_check() that issues the error.
 AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:1],
   [1], [],
-  [ovs-ofctl: actions are invalid with specified match (OFPBRC_BAD_TABLE_ID)
+  [ovs-ofctl: actions are invalid with specified match (OFPBIC_BAD_TABLE_ID)
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP