aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-01-15 10:57:12 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2012-01-16 08:01:23 -0500
commit9bf04646b0b41c5438ed8a27c5f8dbe0ff40d756 (patch)
treed06b83275667828112fc8e3d8ec9a6696a9f523c /net
parent412662d204eca981458156fd64d9d5f3b533d7b6 (diff)
netfilter: revert user-space expectation helper support
This patch partially reverts: 3d058d7 netfilter: rework user-space expectation helper support that was applied during the 3.2 development cycle. After this patch, the tree remains just like before patch bc01bef, that initially added the preliminary infrastructure. I decided to partially revert this patch because the approach that I proposed to resolve this problem is broken in NAT setups. Moreover, a new infrastructure will be submitted for the 3.3.x development cycle that resolve the existing issues while providing a neat solution. Since nobody has been seriously using this infrastructure in user-space, the removal of this feature should affect any know FOSS project (to my knowledge). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_helper.c12
-rw-r--r--net/netfilter/nf_conntrack_netlink.c4
-rw-r--r--net/netfilter/xt_CT.c8
3 files changed, 3 insertions, 21 deletions
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 299fec91f741..bbe23baa19b6 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -121,18 +121,6 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
121 int ret = 0; 121 int ret = 0;
122 122
123 if (tmpl != NULL) { 123 if (tmpl != NULL) {
124 /* we've got a userspace helper. */
125 if (tmpl->status & IPS_USERSPACE_HELPER) {
126 help = nf_ct_helper_ext_add(ct, flags);
127 if (help == NULL) {
128 ret = -ENOMEM;
129 goto out;
130 }
131 rcu_assign_pointer(help->helper, NULL);
132 __set_bit(IPS_USERSPACE_HELPER_BIT, &ct->status);
133 ret = 0;
134 goto out;
135 }
136 help = nfct_help(tmpl); 124 help = nfct_help(tmpl);
137 if (help != NULL) 125 if (help != NULL)
138 helper = help->helper; 126 helper = help->helper;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 2a4834b83332..9307b033c0c9 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2042,10 +2042,6 @@ ctnetlink_create_expect(struct net *net, u16 zone,
2042 } 2042 }
2043 help = nfct_help(ct); 2043 help = nfct_help(ct);
2044 if (!help) { 2044 if (!help) {
2045 err = -EOPNOTSUPP;
2046 goto out;
2047 }
2048 if (test_bit(IPS_USERSPACE_HELPER_BIT, &ct->status)) {
2049 if (!cda[CTA_EXPECT_TIMEOUT]) { 2045 if (!cda[CTA_EXPECT_TIMEOUT]) {
2050 err = -EINVAL; 2046 err = -EINVAL;
2051 goto out; 2047 goto out;
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 8e87123f1373..0221d10de75a 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -62,8 +62,8 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
62 int ret = 0; 62 int ret = 0;
63 u8 proto; 63 u8 proto;
64 64
65 if (info->flags & ~(XT_CT_NOTRACK | XT_CT_USERSPACE_HELPER)) 65 if (info->flags & ~XT_CT_NOTRACK)
66 return -EOPNOTSUPP; 66 return -EINVAL;
67 67
68 if (info->flags & XT_CT_NOTRACK) { 68 if (info->flags & XT_CT_NOTRACK) {
69 ct = nf_ct_untracked_get(); 69 ct = nf_ct_untracked_get();
@@ -92,9 +92,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
92 GFP_KERNEL)) 92 GFP_KERNEL))
93 goto err3; 93 goto err3;
94 94
95 if (info->flags & XT_CT_USERSPACE_HELPER) { 95 if (info->helper[0]) {
96 __set_bit(IPS_USERSPACE_HELPER_BIT, &ct->status);
97 } else if (info->helper[0]) {
98 ret = -ENOENT; 96 ret = -ENOENT;
99 proto = xt_ct_find_proto(par); 97 proto = xt_ct_find_proto(par);
100 if (!proto) { 98 if (!proto) {