diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-03 14:46:00 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-04 15:06:14 +0200 |
commit | d1be6968e457260e869ed013a672ceda710fd2eb (patch) | |
tree | 69231c35ddfe1d81b859d94784ad7cf6a7eac921 /isisd | |
parent | bgpd: Convert to using ETH_ALEN (diff) | |
download | frr-d1be6968e457260e869ed013a672ceda710fd2eb.tar.xz frr-d1be6968e457260e869ed013a672ceda710fd2eb.zip |
isisd: Convert to using prefix.h ETH_ALEN
Remove the #define for ETH_ALEN as well as ETHER_ADDR_LEN
and convert all uses to ETH_ALEN
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_bpf.c | 10 | ||||
-rw-r--r-- | isisd/isis_circuit.c | 4 | ||||
-rw-r--r-- | isisd/isis_circuit.h | 1 | ||||
-rw-r--r-- | isisd/isis_constants.h | 4 |
4 files changed, 6 insertions, 13 deletions
diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c index 69c2f941f..98f612f82 100644 --- a/isisd/isis_bpf.c +++ b/isisd/isis_bpf.c @@ -250,8 +250,8 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, u_char *ssnpa) bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN); stream_set_getp(circuit->rcv_stream, 0); - memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETHER_ADDR_LEN, - ETHER_ADDR_LEN); + memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETH_ALEN, + ETH_ALEN); if (ioctl(circuit->fd, BIOCFLUSH, &one) < 0) zlog_warn("Flushing failed: %s", safe_strerror(errno)); @@ -281,10 +281,10 @@ int isis_send_pdu_bcast(struct isis_circuit *circuit, int level) */ eth = (struct ether_header *)sock_buff; if (level == 1) - memcpy(eth->ether_dhost, ALL_L1_ISS, ETHER_ADDR_LEN); + memcpy(eth->ether_dhost, ALL_L1_ISS, ETH_ALEN); else - memcpy(eth->ether_dhost, ALL_L2_ISS, ETHER_ADDR_LEN); - memcpy(eth->ether_shost, circuit->u.bc.snpa, ETHER_ADDR_LEN); + memcpy(eth->ether_dhost, ALL_L2_ISS, ETH_ALEN); + memcpy(eth->ether_shost, circuit->u.bc.snpa, ETH_ALEN); size_t frame_size = stream_get_endp(circuit->snd_stream) + LLC_LEN; eth->ether_type = htons(isis_ethertype(frame_size)); diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index c321677de..9622dcdbc 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -26,10 +26,6 @@ #include <netinet/if_ether.h> #endif -#ifndef ETHER_ADDR_LEN -#define ETHER_ADDR_LEN ETHERADDRL -#endif - #include "log.h" #include "memory.h" #include "vrf.h" diff --git a/isisd/isis_circuit.h b/isisd/isis_circuit.h index 5e523cd68..ad53be468 100644 --- a/isisd/isis_circuit.h +++ b/isisd/isis_circuit.h @@ -26,6 +26,7 @@ #include "vty.h" #include "if.h" #include "qobj.h" +#include "prefix.h" #include "isis_constants.h" #include "isis_common.h" diff --git a/isisd/isis_constants.h b/isisd/isis_constants.h index 4b5ff888b..f3a5a24dd 100644 --- a/isisd/isis_constants.h +++ b/isisd/isis_constants.h @@ -167,10 +167,6 @@ ((if_is_broadcast((C)->interface)) ? (C->interface->mtu - LLC_LEN) \ : (C->interface->mtu)) -#ifndef ETH_ALEN -#define ETH_ALEN 6 -#endif - #define MAX_LLC_LEN 0x5ff #define ETHERTYPE_EXT_LLC 0x8870 |