提交 fe902a91 编写于 作者: P Pablo Neira Ayuso 提交者: David S. Miller

[NETFILTER] ctnetlink: return -EINVAL if size is wrong

Return -EINVAL if the size isn't OK instead of -EPERM.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NHarald Welte <laforge@netfilter.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d63a9281
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册