netfilter: ctnetlink: use EOPNOTSUPP instead of EINVAL if the conntrack has no helper

This patch changes the return value if the conntrack has no helper assigned.
Instead of EINVAL, which is reserved for malformed messages, it returns
EOPNOTSUPP.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Pablo Neira Ayuso 2008-11-17 15:55:48 +01:00 committed by Patrick McHardy
parent 238ede8160
commit bfe2967735

View file

@ -1652,7 +1652,7 @@ ctnetlink_create_expect(struct nlattr *cda[], u_int8_t u3)
if (!help || !help->helper) {
/* such conntrack hasn't got any helper, abort */
err = -EINVAL;
err = -EOPNOTSUPP;
goto out;
}