git: 83e524e8f656 - stable/14 - if_tuntap: remove redundant check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Jan 2024 17:01:47 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=83e524e8f6567f7f336304eb3f2f9ceeea68cd66
commit 83e524e8f6567f7f336304eb3f2f9ceeea68cd66
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-11-09 10:43:54 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-01-12 16:59:27 +0000
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)
---
sys/net/if_tuntap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
index 738e6b997ace..0de5b0d2d521 100644
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -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);