-/* $OpenBSD: bridgectl.c,v 1.7 2018/02/05 03:51:53 henning Exp $ */
+/* $OpenBSD: bridgectl.c,v 1.8 2018/02/05 05:06:51 henning Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
h = bridge_hash(sc, ea);
LIST_FOREACH(p, &sc->sc_rts[h], brt_next) {
- if (bcmp(ea, &p->brt_addr, sizeof(p->brt_addr)) == 0) {
+ if (memcmp(ea, &p->brt_addr, sizeof(p->brt_addr)) == 0) {
LIST_REMOVE(p, brt_next);
sc->sc_brtcnt--;
free(p, M_DEVBUF, sizeof *p);
if (n->brl_arpf.brla_op && ntohs(ea.arp_op) != n->brl_arpf.brla_op)
return (0);
if (n->brl_arpf.brla_flags & BRLA_SHA &&
- bcmp(ea.arp_sha, &n->brl_arpf.brla_sha, ETHER_ADDR_LEN))
+ memcmp(ea.arp_sha, &n->brl_arpf.brla_sha, ETHER_ADDR_LEN))
return (0);
if (n->brl_arpf.brla_flags & BRLA_THA &&
- bcmp(ea.arp_tha, &n->brl_arpf.brla_tha, ETHER_ADDR_LEN))
+ memcmp(ea.arp_tha, &n->brl_arpf.brla_tha, ETHER_ADDR_LEN))
return (0);
if (n->brl_arpf.brla_flags & BRLA_SPA &&
- bcmp(ea.arp_spa, &n->brl_arpf.brla_spa, sizeof(struct in_addr)))
+ memcmp(ea.arp_spa, &n->brl_arpf.brla_spa, sizeof(struct in_addr)))
return (0);
if (n->brl_arpf.brla_flags & BRLA_TPA &&
- bcmp(ea.arp_tpa, &n->brl_arpf.brla_tpa, sizeof(struct in_addr)))
+ memcmp(ea.arp_tpa, &n->brl_arpf.brla_tpa, sizeof(struct in_addr)))
return (0);
return (1);
if (flags == 0)
goto return_action;
if (flags == (BRL_FLAG_SRCVALID|BRL_FLAG_DSTVALID)) {
- if (bcmp(eh->ether_shost, &n->brl_src, ETHER_ADDR_LEN))
+ if (memcmp(eh->ether_shost, &n->brl_src,
+ ETHER_ADDR_LEN))
continue;
- if (bcmp(eh->ether_dhost, &n->brl_dst, ETHER_ADDR_LEN))
+ if (memcmp(eh->ether_dhost, &n->brl_dst,
+ ETHER_ADDR_LEN))
continue;
goto return_action;
}
if (flags == BRL_FLAG_SRCVALID) {
- if (bcmp(eh->ether_shost, &n->brl_src, ETHER_ADDR_LEN))
+ if (memcmp(eh->ether_shost, &n->brl_src,
+ ETHER_ADDR_LEN))
continue;
goto return_action;
}
if (flags == BRL_FLAG_DSTVALID) {
- if (bcmp(eh->ether_dhost, &n->brl_dst, ETHER_ADDR_LEN))
+ if (memcmp(eh->ether_dhost, &n->brl_dst,
+ ETHER_ADDR_LEN))
continue;
goto return_action;
}
-/* $OpenBSD: if_bridge.c,v 1.302 2018/02/05 03:51:53 henning Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.303 2018/02/05 05:06:51 henning Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
* STP destination address (as stored in bstp_etheraddr)
* is the first of these.
*/
- if (bcmp(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN - 1)
- == 0) {
+ if (memcmp(eh->ether_dhost, bstp_etheraddr,
+ ETHER_ADDR_LEN - 1) == 0) {
if (eh->ether_dhost[ETHER_ADDR_LEN - 1] == 0) {
/* STP traffic */
if ((m = bstp_input(sc->sc_stp, ifl->bif_stp,
if (ifl->ifp->if_type != IFT_ETHER)
continue;
ac = (struct arpcom *)ifl->ifp;
- if (bcmp(ac->ac_enaddr, eh->ether_dhost, ETHER_ADDR_LEN) == 0
+ if (memcmp(ac->ac_enaddr, eh->ether_dhost, ETHER_ADDR_LEN) == 0
#if NCARP > 0
|| (!SRPL_EMPTY_LOCKED(&ifl->ifp->if_carp) &&
!carp_ourether(ifl->ifp, eh->ether_dhost))
bridge_ifinput(ifl->ifp, m);
return;
}
- if (bcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0
+ if (memcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0
#if NCARP > 0
|| (!SRPL_EMPTY_LOCKED(&ifl->ifp->if_carp) &&
!carp_ourether(ifl->ifp, eh->ether_shost))