if_tuntap: remove redundant check

eh can't be NULL, so there is no need to check for it.
Reported by:	zlei
Sponsored by:	Netflix, Inc.

(cherry picked from commit 44669b76504991ef3ac10ef10bc0fa931ae79c45)
This commit is contained in:
Michael Tuexen 2023-11-09 11:43:54 +01:00
parent 002829ea61
commit 83e524e8f6

View file

@ -1779,7 +1779,7 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m,
eh = mtod(m, struct ether_header *);
if (eh && (ifp->if_flags & IFF_PROMISC) == 0 &&
if ((ifp->if_flags & IFF_PROMISC) == 0 &&
!ETHER_IS_MULTICAST(eh->ether_dhost) &&
bcmp(eh->ether_dhost, IF_LLADDR(ifp), ETHER_ADDR_LEN) != 0) {
m_freem(m);