Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/uipc_mbuf.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/kern/uipc_mbuf.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.158.4.1 retrieving revision 1.158.4.1.6.1 diff -u -p -r1.158.4.1 -r1.158.4.1.6.1 --- src/sys/kern/uipc_mbuf.c 2015/02/09 09:46:01 1.158.4.1 +++ src/sys/kern/uipc_mbuf.c 2018/04/05 11:50:17 1.158.4.1.6.1 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.158.4.1 2015/02/09 09:46:01 martin Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.158.4.1.6.1 2018/04/05 11:50:17 martin Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.158.4.1 2015/02/09 09:46:01 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.158.4.1.6.1 2018/04/05 11:50:17 martin Exp $"); #include "opt_mbuftrace.h" #include "opt_nmbclusters.h" @@ -453,6 +453,16 @@ mb_ctor(void *arg, void *object, int fla return (0); } +void +m_pkthdr_remove(struct mbuf *m) +{ + KASSERT(m->m_flags & M_PKTHDR); + + m_tag_delete_chain(m, NULL); + m->m_flags &= ~M_PKTHDR; + memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr)); +} + /* * Add mbuf to the end of a chain */