mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 14:34:22 +00:00
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>
This commit is contained in:
parent
28328ea953
commit
d1be6968e4
@ -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);
|
bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN);
|
||||||
stream_set_getp(circuit->rcv_stream, 0);
|
stream_set_getp(circuit->rcv_stream, 0);
|
||||||
|
|
||||||
memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETHER_ADDR_LEN,
|
memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETH_ALEN,
|
||||||
ETHER_ADDR_LEN);
|
ETH_ALEN);
|
||||||
|
|
||||||
if (ioctl(circuit->fd, BIOCFLUSH, &one) < 0)
|
if (ioctl(circuit->fd, BIOCFLUSH, &one) < 0)
|
||||||
zlog_warn("Flushing failed: %s", safe_strerror(errno));
|
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;
|
eth = (struct ether_header *)sock_buff;
|
||||||
if (level == 1)
|
if (level == 1)
|
||||||
memcpy(eth->ether_dhost, ALL_L1_ISS, ETHER_ADDR_LEN);
|
memcpy(eth->ether_dhost, ALL_L1_ISS, ETH_ALEN);
|
||||||
else
|
else
|
||||||
memcpy(eth->ether_dhost, ALL_L2_ISS, ETHER_ADDR_LEN);
|
memcpy(eth->ether_dhost, ALL_L2_ISS, ETH_ALEN);
|
||||||
memcpy(eth->ether_shost, circuit->u.bc.snpa, ETHER_ADDR_LEN);
|
memcpy(eth->ether_shost, circuit->u.bc.snpa, ETH_ALEN);
|
||||||
size_t frame_size = stream_get_endp(circuit->snd_stream) + LLC_LEN;
|
size_t frame_size = stream_get_endp(circuit->snd_stream) + LLC_LEN;
|
||||||
eth->ether_type = htons(isis_ethertype(frame_size));
|
eth->ether_type = htons(isis_ethertype(frame_size));
|
||||||
|
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ETHER_ADDR_LEN
|
|
||||||
#define ETHER_ADDR_LEN ETHERADDRL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "vrf.h"
|
#include "vrf.h"
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "vty.h"
|
#include "vty.h"
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
#include "qobj.h"
|
#include "qobj.h"
|
||||||
|
#include "prefix.h"
|
||||||
|
|
||||||
#include "isis_constants.h"
|
#include "isis_constants.h"
|
||||||
#include "isis_common.h"
|
#include "isis_common.h"
|
||||||
|
@ -167,10 +167,6 @@
|
|||||||
((if_is_broadcast((C)->interface)) ? (C->interface->mtu - LLC_LEN) \
|
((if_is_broadcast((C)->interface)) ? (C->interface->mtu - LLC_LEN) \
|
||||||
: (C->interface->mtu))
|
: (C->interface->mtu))
|
||||||
|
|
||||||
#ifndef ETH_ALEN
|
|
||||||
#define ETH_ALEN 6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_LLC_LEN 0x5ff
|
#define MAX_LLC_LEN 0x5ff
|
||||||
#define ETHERTYPE_EXT_LLC 0x8870
|
#define ETHERTYPE_EXT_LLC 0x8870
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user