aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) \