Don't use error categories as if they were actually errors.
[sliver-openvswitch.git] / lib / ofp-actions.c
index 9c458a9..b758c7c 100644 (file)
@@ -718,7 +718,7 @@ ofpact_from_openflow11(const union ofp_action *a, struct ofpbuf *out)
         if (((const struct ofp11_action_push *)a)->ethertype !=
             htons(ETH_TYPE_VLAN_8021Q)) {
             /* TODO:XXX 802.1AD(QinQ) isn't supported at the moment */
-            return OFPERR_OFPET_BAD_ACTION;
+            return OFPERR_OFPBAC_BAD_ARGUMENT;
         }
         ofpact_put_PUSH_VLAN(out);
         break;
@@ -917,7 +917,9 @@ decode_openflow11_instructions(const struct ofp11_instruction insts[],
         }
 
         if (out[type]) {
-            return OFPERR_OFPIT_BAD_INSTRUCTION;
+            return OFPERR_OFPBAC_UNSUPPORTED_ORDER; /* No specific code for
+                                                     * a duplicate instruction
+                                                     * exist */
         }
         out[type] = inst;
     }
@@ -1157,7 +1159,6 @@ ofpacts_verify(const struct ofpact ofpacts[], size_t ofpacts_len)
         if (om) {
             if (a->type == OFPACT_WRITE_METADATA) {
                 VLOG_WARN("duplicate write_metadata instruction specified");
-                /* should be OFPERR_OFPET_BAD_ACTION? */
                 return OFPERR_OFPBAC_UNSUPPORTED_ORDER;
             } else {
                 VLOG_WARN("write_metadata instruction must be specified after "