netfilter: ctnetlink: use EOPNOTSUPP instead of EINVAL if the conntrack has no helper
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Nov 2008 14:55:48 +0000 (15:55 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 17 Nov 2008 14:55:48 +0000 (15:55 +0100)
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>
net/netfilter/nf_conntrack_netlink.c

index 80a3f130815289dec1d14afdaf3c1649897a7673..d87a9398a781e9ac04923dbbea6850650eb8f1c1 100644 (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;
        }