浏览代码

netfilter: ctnetlink: use EOPNOTSUPP instead of EINVAL if the conntrack has no helper

This patch changes the return value if the conntrack has no helper assigned.
Instead of EINVAL, which is reserved for malformed messages, it returns
EOPNOTSUPP.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Pablo Neira Ayuso 16 年之前
父节点
当前提交
bfe2967735
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/netfilter/nf_conntrack_netlink.c

+ 1 - 1
net/netfilter/nf_conntrack_netlink.c

@@ -1652,7 +1652,7 @@ ctnetlink_create_expect(struct nlattr *cda[], u_int8_t u3)
 
 	if (!help || !help->helper) {
 		/* such conntrack hasn't got any helper, abort */
-		err = -EINVAL;
+		err = -EOPNOTSUPP;
 		goto out;
 	}