aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_tag.c')
-rw-r--r--sys/netgraph/ng_tag.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netgraph/ng_tag.c b/sys/netgraph/ng_tag.c
index 22d45a3174ad..1a9d44528a24 100644
--- a/sys/netgraph/ng_tag.c
+++ b/sys/netgraph/ng_tag.c
@@ -361,9 +361,8 @@ ng_tag_rcvmsg(node_p node, item_p item, hook_p lasthook)
hook_p hook;
/* Sanity check. */
- if (msg->header.arglen < sizeof(*hp)
- || msg->header.arglen !=
- NG_TAG_HOOKIN_SIZE(hp->tag_len))
+ if (msg->header.arglen < sizeof(*hp) ||
+ msg->header.arglen < NG_TAG_HOOKIN_SIZE(hp->tag_len))
ERROUT(EINVAL);
/* Find hook. */
@@ -383,9 +382,8 @@ ng_tag_rcvmsg(node_p node, item_p item, hook_p lasthook)
hook_p hook;
/* Sanity check. */
- if (msg->header.arglen < sizeof(*hp)
- || msg->header.arglen !=
- NG_TAG_HOOKOUT_SIZE(hp->tag_len))
+ if (msg->header.arglen < sizeof(*hp) ||
+ msg->header.arglen < NG_TAG_HOOKOUT_SIZE(hp->tag_len))
ERROUT(EINVAL);
/* Find hook. */