summaryrefslogtreecommitdiff
path: root/lib/cfm.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-03-22 14:28:22 -0700
committerEthan Jackson <ethan@nicira.com>2011-03-23 13:16:38 -0700
commit15df7ea8d9a338113fc0bd8d2a0a841ec7ce4b6c (patch)
tree58e3a24c380988e6fca08e4d6d5259d3c8ab741c /lib/cfm.c
parent3728652303e1d58fe67b90dfa2a07668289902c8 (diff)
downloadopenvswitch-15df7ea8d9a338113fc0bd8d2a0a841ec7ce4b6c.tar.gz
cfm: Move destination address to cfm.h
Future patches will require the use of this information globally.
Diffstat (limited to 'lib/cfm.c')
-rw-r--r--lib/cfm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/cfm.c b/lib/cfm.c
index 0d720946f..683cc7127 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -33,7 +33,6 @@
VLOG_DEFINE_THIS_MODULE(cfm);
#define CCM_OPCODE 1 /* CFM message opcode meaning CCM. */
-#define DEST_ADDR UINT64_C(0x0180C2000030) /* MD level 0 CCM destination. */
struct cfm_internal {
struct cfm cfm;
@@ -125,7 +124,7 @@ compose_ccm(struct cfm_internal *cfmi)
eth = ofpbuf_put_zeros(packet, ETH_HEADER_LEN);
ccm = ofpbuf_put_zeros(packet, CCM_LEN);
- eth_addr_from_uint64(DEST_ADDR, eth->eth_dst);
+ memcpy(eth->eth_dst, eth_addr_ccm, ETH_ADDR_LEN);
memcpy(eth->eth_src, cfmi->cfm.eth_src, sizeof eth->eth_src);
eth->eth_type = htons(ETH_TYPE_CFM);
@@ -370,7 +369,7 @@ bool
cfm_should_process_flow(const struct flow *flow)
{
return (ntohs(flow->dl_type) == ETH_TYPE_CFM
- && eth_addr_to_uint64(flow->dl_dst) == DEST_ADDR);
+ && eth_addr_equals(flow->dl_dst, eth_addr_ccm));
}
/* Updates internal statistics relevant to packet 'p'. Should be called on