Skip to content

Commit

Permalink
[NETFILTER] ctnetlink: return -EINVAL if size is wrong
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Nov 9, 2005
1 parent d63a928 commit fe902a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe902a9

Please sign in to comment.