mirror of https://gitee.com/openkylin/linux.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 <pablo@netfilter.org> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d63a928108
commit
fe902a91ff
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue