summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-03 08:44:25 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-08-04 09:06:14 -0400
commit9bff805755e1999679795c39a6cd5a602a092651 (patch)
tree740185ffc79efd8c25f1b850d65701df72a35e87
parentff8b7eb87028c8f52a598794c3f5a360c922bd4f (diff)
ldpd: Switch to using ETH_ALEN
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--ldpd/address.c6
-rw-r--r--ldpd/ldp_zebra.c2
-rw-r--r--ldpd/ldpd.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/ldpd/address.c b/ldpd/address.c
index 584240de84..18ab037760 100644
--- a/ldpd/address.c
+++ b/ldpd/address.c
@@ -160,7 +160,7 @@ send_mac_withdrawal(struct nbr *nbr, struct map *fec, uint8_t *mac)
size = LDP_HDR_SIZE + LDP_MSG_SIZE + ADDR_LIST_SIZE + len_fec_tlv(fec) +
TLV_HDR_SIZE;
if (mac)
- size += ETHER_ADDR_LEN;
+ size += ETH_ALEN;
if ((buf = ibuf_open(size)) == NULL)
fatal(__func__);
@@ -372,10 +372,10 @@ gen_mac_list_tlv(struct ibuf *buf, uint8_t *mac)
memset(&tlv, 0, sizeof(tlv));
tlv.type = htons(TLV_TYPE_MAC_LIST);
if (mac)
- tlv.length = htons(ETHER_ADDR_LEN);
+ tlv.length = htons(ETH_ALEN);
err = ibuf_add(buf, &tlv, sizeof(tlv));
if (mac)
- err |= ibuf_add(buf, mac, ETHER_ADDR_LEN);
+ err |= ibuf_add(buf, mac, ETH_ALEN);
return (err);
}
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c
index 79fff01c4c..efc6bd5279 100644
--- a/ldpd/ldp_zebra.c
+++ b/ldpd/ldp_zebra.c
@@ -64,7 +64,7 @@ ifp2kif(struct interface *ifp, struct kif *kif)
kif->ifindex = ifp->ifindex;
kif->operative = if_is_operative(ifp);
if (ifp->ll_type == ZEBRA_LLT_ETHER)
- memcpy(kif->mac, ifp->hw_addr, ETHER_ADDR_LEN);
+ memcpy(kif->mac, ifp->hw_addr, ETH_ALEN);
}
static void
diff --git a/ldpd/ldpd.h b/ldpd/ldpd.h
index 352a7b0d7e..00d2627f11 100644
--- a/ldpd/ldpd.h
+++ b/ldpd/ldpd.h
@@ -389,7 +389,7 @@ struct l2vpn_if {
char ifname[IF_NAMESIZE];
unsigned int ifindex;
int operative;
- uint8_t mac[ETHER_ADDR_LEN];
+ uint8_t mac[ETH_ALEN];
QOBJ_FIELDS
};
RB_HEAD(l2vpn_if_head, l2vpn_if);
@@ -566,7 +566,7 @@ struct kif {
unsigned short ifindex;
int flags;
int operative;
- uint8_t mac[ETHER_ADDR_LEN];
+ uint8_t mac[ETH_ALEN];
int mtu;
};