aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-22 22:32:14 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-22 22:32:14 -0600
commit96f33dfffd1f3ded54b141b7397e30d6933125c1 (patch)
tree7639330a1ea481314ed6c802bc24a61c0063310e
parentif_wg: destroy interfaces on module unload (diff)
downloadwireguard-freebsd-96f33dfffd1f3ded54b141b7397e30d6933125c1.tar.xz
wireguard-freebsd-96f33dfffd1f3ded54b141b7397e30d6933125c1.zip
if_wg: set snd_tag to NULL after releasing
The rest of the stack does this. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/if_wg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/if_wg.c b/src/if_wg.c
index c8ffa09..3039959 100644
--- a/src/if_wg.c
+++ b/src/if_wg.c
@@ -1429,8 +1429,10 @@ wg_mbuf_reset(struct mbuf *m)
m_tag_delete(m, t);
}
- if (m->m_pkthdr.csum_flags & CSUM_SND_TAG)
+ if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) {
m_snd_tag_rele(m->m_pkthdr.snd_tag);
+ m->m_pkthdr.snd_tag = NULL;
+ }
m->m_pkthdr.csum_flags = 0;
m->m_pkthdr.PH_per.sixtyfour[0] = 0;