Future patches will move the code that requires CCM_OPCODE to the
packets library.  The packets library does not use #defines for
this sort of thing.
---
 lib/cfm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/cfm.c b/lib/cfm.c
index 683cc71..6fb82c1 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -32,8 +32,6 @@
 
 VLOG_DEFINE_THIS_MODULE(cfm);
 
-#define CCM_OPCODE 1              /* CFM message opcode meaning CCM. */
-
 struct cfm_internal {
     struct cfm cfm;
     uint32_t seq;          /* The sequence number of our last CCM. */
@@ -129,7 +127,7 @@ compose_ccm(struct cfm_internal *cfmi)
     eth->eth_type = htons(ETH_TYPE_CFM);
 
     ccm->mdlevel_version = 0;
-    ccm->opcode          = CCM_OPCODE;
+    ccm->opcode          = 1;
     ccm->tlv_offset      = 70;
     ccm->seq             = htonl(++cfmi->seq);
     ccm->mpid            = htons(cfmi->cfm.mpid);
@@ -394,7 +392,7 @@ cfm_process_heartbeat(struct cfm *cfm, const struct ofpbuf 
*p)
         return;
     }
 
-    if (ccm->opcode != CCM_OPCODE) {
+    if (ccm->opcode != 1) {
         VLOG_INFO_RL(&rl, "Received an unsupported 802.1ag message. "
                      "(opcode %u)", ccm->opcode);
         return;
-- 
1.7.4.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to