summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2017-08-05 05:19:01 +0200
committerGitHub <noreply@github.com>2017-08-05 05:19:01 +0200
commitc053ff8bff5adba000097ae81c17a0e1cb6c7a43 (patch)
treeb1e0dfd1f8e73553d5879e16f379bab6b4f092af /isisd
parentMerge pull request #914 from jbonor/fixes (diff)
parentisisd: Convert to using prefix.h ETH_ALEN (diff)
downloadfrr-c053ff8bff5adba000097ae81c17a0e1cb6c7a43.tar.xz
frr-c053ff8bff5adba000097ae81c17a0e1cb6c7a43.zip
Merge pull request #899 from donaldsharp/ETH_ALEN
Fix Crash and Convert to ETH_ALEN
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_bpf.c10
-rw-r--r--isisd/isis_circuit.c4
-rw-r--r--isisd/isis_circuit.h1
-rw-r--r--isisd/isis_constants.h4
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