mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
ethernet: Prefer memcmp() over bcmp()
The link-level address and the mbuf shall not overlap. Prefer memcmp() over bcmp() for slight performance gain. No functional change intended. Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52345 (cherry picked from commit 51098f0529f0d1cc532512e0eae9bfcffb8e68e4)
This commit is contained in:
parent
57d006208f
commit
eb368f421f
1 changed files with 1 additions and 1 deletions
|
|
@ -712,7 +712,7 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
|
|||
* seen by upper protocol layers.
|
||||
*/
|
||||
if (!ETHER_IS_MULTICAST(eh->ether_dhost) &&
|
||||
bcmp(IF_LLADDR(ifp), eh->ether_dhost, ETHER_ADDR_LEN) != 0)
|
||||
memcmp(IF_LLADDR(ifp), eh->ether_dhost, ETHER_ADDR_LEN) != 0)
|
||||
m->m_flags |= M_PROMISC;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue