summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2005-11-09 22:03:09 +0100
committerDavid S. Miller <davem@davemloft.net>2005-11-09 22:03:09 +0100
commitfe902a91ff427af7dbf20e7c196623b2a4eade13 (patch)
tree6c1a4e96e52dcace7241ac261507edf5e2bdab59 /net/ipv4
parent[NETFILTER]: stop tracking ICMP error at early point (diff)
downloadlinux-fe902a91ff427af7dbf20e7c196623b2a4eade13.tar.xz
linux-fe902a91ff427af7dbf20e7c196623b2a4eade13.zip
[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 <pablo@netfilter.org> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_netlink.c2
1 files changed, 1 insertions, 1 deletions
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)