From: Pablo Neira Ayuso Date: Wed, 9 Nov 2005 21:03:09 +0000 (-0800) Subject: [NETFILTER] ctnetlink: return -EINVAL if size is wrong X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe902a91ff427af7dbf20e7c196623b2a4eade13;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NETFILTER] ctnetlink: return -EINVAL if size is wrong Return -EINVAL if the size isn't OK instead of -EPERM. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Harald Welte Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index d1dde1417ef7..cfc5487e627a 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c @@ -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)