aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-04-18 12:37:33 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-04-18 12:37:33 +0000
commit11589318f3bb4cd561af4cb65f92b07244ef01c4 (patch)
treefa65d689dc2a92bc76498583822eb53ac8ee5bb9
parent078d4c1b8ba4dba79e98c3f8cc9d6ff2c498195d (diff)
downloadsrc-11589318f3bb4cd561af4cb65f92b07244ef01c4.tar.gz
src-11589318f3bb4cd561af4cb65f92b07244ef01c4.zip
KASSERT that NG_MKMESSAGE() is not called with mbuf flags.
Notes
Notes: svn path=/head/; revision=113663
-rw-r--r--sys/netgraph/ng_message.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index e8fd8325f931..ea6b35f3e72b 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -361,6 +361,10 @@ struct flow_manager {
*/
#define NG_MKMESSAGE(msg, cookie, cmdid, len, how) \
do { \
+ KASSERT(!(how & M_DONTWAIT), \
+ ("NG_MKMESSAGE() with how=M_DONTWAIT (%d)\n", how)); \
+ KASSERT(!(how & M_TRYWAIT), \
+ ("NG_MKMESSAGE() with how=M_TRYWAIT (%d)\n", how)); \
MALLOC((msg), struct ng_mesg *, sizeof(struct ng_mesg) \
+ (len), M_NETGRAPH_MSG, (how) | M_ZERO); \
if ((msg) == NULL) \