summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-12-15 03:43:34 +0000
committerdlg <dlg@openbsd.org>2020-12-15 03:43:34 +0000
commit0e4556b21dc7ef03df574812a214748d12e9edc0 (patch)
tree49deb04a9ff0335db38cdcf6682ee67c6bff8369
parentfill in more of mcx_cap_device so i can get to the device frequencies. (diff)
downloadwireguard-openbsd-0e4556b21dc7ef03df574812a214748d12e9edc0.tar.xz
wireguard-openbsd-0e4556b21dc7ef03df574812a214748d12e9edc0.zip
clear M_TIMESTAMP in if_enqueue.
this is to avoid a timestamp being used on the way out of the stack (eg, in bpf), or if it reenters the stack (eg, if it goes between rdomains with pair(4)).
-rw-r--r--sys/net/if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index d49be448477..d83d7e06545 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.620 2020/10/03 00:23:55 mvs Exp $ */
+/* $OpenBSD: if.c,v 1.621 2020/12/15 03:43:34 dlg Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -682,6 +682,8 @@ if_qstart_compat(struct ifqueue *ifq)
int
if_enqueue(struct ifnet *ifp, struct mbuf *m)
{
+ CLR(m->m_pkthdr.csum_flags, M_TIMESTAMP);
+
#if NPF > 0
if (m->m_pkthdr.pf.delay > 0)
return (pf_delay_pkt(m, ifp->if_index));