diff options
-rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter/xt_CT.h | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 12 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_CT.c | 8 |
5 files changed, 4 insertions, 27 deletions
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 9e3a2838291b..0d3dd66322ec 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -83,10 +83,6 @@ enum ip_conntrack_status { | |||
83 | /* Conntrack is a fake untracked entry */ | 83 | /* Conntrack is a fake untracked entry */ |
84 | IPS_UNTRACKED_BIT = 12, | 84 | IPS_UNTRACKED_BIT = 12, |
85 | IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), | 85 | IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), |
86 | |||
87 | /* Conntrack has a userspace helper. */ | ||
88 | IPS_USERSPACE_HELPER_BIT = 13, | ||
89 | IPS_USERSPACE_HELPER = (1 << IPS_USERSPACE_HELPER_BIT), | ||
90 | }; | 86 | }; |
91 | 87 | ||
92 | /* Connection tracking event types */ | 88 | /* Connection tracking event types */ |
diff --git a/include/linux/netfilter/xt_CT.h b/include/linux/netfilter/xt_CT.h index 6390f0992f36..b56e76811c04 100644 --- a/include/linux/netfilter/xt_CT.h +++ b/include/linux/netfilter/xt_CT.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #define XT_CT_NOTRACK 0x1 | 6 | #define XT_CT_NOTRACK 0x1 |
7 | #define XT_CT_USERSPACE_HELPER 0x2 | ||
8 | 7 | ||
9 | struct xt_ct_target_info { | 8 | struct xt_ct_target_info { |
10 | __u16 flags; | 9 | __u16 flags; |
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) { |