aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-22 00:14:21 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-22 00:38:40 -0600
commited944d02de70dc09e0a03e92c37307d404634ad2 (patch)
treebcea6c4fee9bde39f718147920fc6c61e1b5d06f /src
parentglobal: add missing brackets (diff)
downloadwireguard-freebsd-ed944d02de70dc09e0a03e92c37307d404634ad2.tar.xz
wireguard-freebsd-ed944d02de70dc09e0a03e92c37307d404634ad2.zip
if_wg: correct logic in tag clearing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/if_wg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/if_wg.c b/src/if_wg.c
index 9a33adf..762acbf 100644
--- a/src/if_wg.c
+++ b/src/if_wg.c
@@ -1423,7 +1423,7 @@ wg_mbuf_reset(struct mbuf *m)
m->m_pkthdr.numa_domain = M_NODOM;
#endif
SLIST_FOREACH_SAFE(t, &m->m_pkthdr.tags, m_tag_link, tmp) {
- if (t->m_tag_id != 0 && t->m_tag_cookie != MTAG_WGLOOP &&
+ if ((t->m_tag_id != 0 || t->m_tag_cookie != MTAG_WGLOOP) &&
t->m_tag_id != PACKET_TAG_MACLABEL)
m_tag_delete(m, t);
}