summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_message.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-18 12:37:33 +0000
committerphk <phk@FreeBSD.org>2003-04-18 12:37:33 +0000
commitd9c56fdf9e586858940cd499c84794f809c04da0 (patch)
treefa65d689dc2a92bc76498583822eb53ac8ee5bb9 /sys/netgraph/ng_message.h
parent4819c92a75c2c2021d427aebc8b7323c48a56b68 (diff)
downloadFreeBSD-src-d9c56fdf9e586858940cd499c84794f809c04da0.zip
FreeBSD-src-d9c56fdf9e586858940cd499c84794f809c04da0.tar.gz
KASSERT that NG_MKMESSAGE() is not called with mbuf flags.
Diffstat (limited to 'sys/netgraph/ng_message.h')
-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 e8fd832..ea6b35f 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) \
OpenPOWER on IntegriCloud