Return EINVAL for incorrect hook names.

PR:		kern/81349
Submitted by:	Wojciech A. Koszek
This commit is contained in:
glebius 2005-05-23 13:39:20 +00:00
parent 6e1ae33f12
commit fc2a32a0ae

View File

@ -112,9 +112,8 @@ ng_split_newhook(node_p node, hook_p hook, const char *name)
localhook = &priv->in;
} else if (strcmp(name, NG_SPLIT_HOOK_OUT) == 0) {
localhook = &priv->out;
} else {
return (EPFNOSUPPORT);
}
} else
return (EINVAL);
if (*localhook != NULL)
return (EISCONN);