diff --git a/datapath/forward.c b/datapath/forward.c index 54ad075..62d614a 100644 --- a/datapath/forward.c +++ b/datapath/forward.c @@ -252,7 +252,7 @@ add_flow(struct sw_chain *chain, const struct sender *sender, || ntohs(ofm->hard_timeout) != 0) { dp_send_error_msg(chain->dp, sender, OFPET_FLOW_MOD_FAILED, - OFPFMFC_EMERG, + OFPFMFC_BAD_EMERG_TIMEOUT, ofm, ntohs(ofm->header.length)); goto error_free_flow; } diff --git a/include/openflow/openflow.h b/include/openflow/openflow.h index 76e688e..3f737db 100644 --- a/include/openflow/openflow.h +++ b/include/openflow/openflow.h @@ -636,7 +636,7 @@ enum ofp_flow_mod_failed_code { OFPFMFC_OVERLAP, /* Attempted to add overlapping flow with * CHECK_OVERLAP flag set. */ OFPFMFC_EPERM, /* Permissions error. */ - OFPFMFC_EMERG /* Flow not added because of non-zero idle/hard + OFPFMFC_BAD_EMERG_TIMEOUT /* Flow not added because of non-zero idle/hard * timeout. */ }; diff --git a/lib/ofp-print.c b/lib/ofp-print.c index f99be4f..188871a 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -898,7 +898,7 @@ static const struct error_type error_types[] = { ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_ALL_TABLES_FULL), ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_OVERLAP), ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_EPERM), - ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_EMERG) + ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_BAD_EMERG_TIMEOUT) }; #define N_ERROR_TYPES ARRAY_SIZE(error_types) diff --git a/lib/ofpstat.c b/lib/ofpstat.c index eb2a861..e4bcca8 100644 --- a/lib/ofpstat.c +++ b/lib/ofpstat.c @@ -198,7 +198,7 @@ inc_error_notification(struct ofpstat *ifps, struct ofp_header *hdr) case OFPFMFC_EPERM: INC_IFP_STAT(ifps, ofps_error_code.fmf_eperm); break; - case OFPFMFC_EMERG: + case OFPFMFC_BAD_EMERG_TIMEOUT: INC_IFP_STAT(ifps, ofps_error_code.fmf_emerg); break; default: diff --git a/udatapath/datapath.c b/udatapath/datapath.c index 35137ee..9b30128 100644 --- a/udatapath/datapath.c +++ b/udatapath/datapath.c @@ -1023,7 +1023,8 @@ add_flow(struct datapath *dp, const struct sender *sender, if (ntohs(ofm->flags) & OFPFF_EMERG) { if (ntohs(ofm->idle_timeout) != 0 || ntohs(ofm->hard_timeout) != 0) { dp_send_error_msg(dp, sender, OFPET_FLOW_MOD_FAILED, - OFPFMFC_EMERG, ofm, ntohs(ofm->header.length)); + OFPFMFC_BAD_EMERG_TIMEOUT, ofm, + ntohs(ofm->header.length)); goto error_free_flow; } }