[NETFILTER] ctnetlink: return -EINVAL if size is wrong
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 9 Nov 2005 21:03:09 +0000 (13:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Nov 2005 21:03:09 +0000 (13:03 -0800)
Return -EINVAL if the size isn't OK instead of -EPERM.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_conntrack_netlink.c

index d1dde1417ef7d049175473648d84a667fee837cc..cfc5487e627acf7d6d76e3108ee9f46721d8d5a2 100644 (file)
@@ -593,7 +593,7 @@ static int ctnetlink_parse_nat_proto(struct nfattr *attr,
        nfattr_parse_nested(tb, CTA_PROTONAT_MAX, attr);
 
        if (nfattr_bad_size(tb, CTA_PROTONAT_MAX, cta_min_protonat))
-               return -1;
+               return -EINVAL;
 
        npt = ip_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum);
        if (!npt)