diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2023-11-09 10:43:54 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2024-01-12 17:54:01 +0000 |
commit | 7fe50d188806a49da30fedd1f3f6d8fad1100b95 (patch) | |
tree | 0e0fd9eba0f9d1664c31cff153f89fdf4b06eae9 | |
parent | 41988a137d556b0e4bd6259bc7af0c63f6975596 (diff) | |
download | src-7fe50d188806a49da30fedd1f3f6d8fad1100b95.tar.gz src-7fe50d188806a49da30fedd1f3f6d8fad1100b95.zip |
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)
-rw-r--r-- | sys/net/if_tuntap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 9cadd971eb37..28b8454c2894 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1772,7 +1772,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); |