diff options
author | Harald Welte <laforge@netfilter.org> | 2005-11-03 08:27:07 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-11-04 20:02:53 -0500 |
commit | 3428c209c6820bbbb7dfb323caef8d402b3deb4c (patch) | |
tree | 5caef19fb765ba05a6b745770ac733e1065470d2 | |
parent | 0bbacc402e67abca8794a8401c1621dc0c0202e9 (diff) |
[NETFILTER] PPTP helper: Fix compilation of conntrack helper without NAT
This patch fixes compilation of the PPTP conntrack helper when NAT is
configured off.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_nat_helper_pptp.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c index 926a6684643d..4108a5e12b3c 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c | |||
@@ -270,14 +270,10 @@ exp_gre(struct ip_conntrack *master, | |||
270 | exp_orig->expectfn = pptp_expectfn; | 270 | exp_orig->expectfn = pptp_expectfn; |
271 | exp_orig->flags = 0; | 271 | exp_orig->flags = 0; |
272 | 272 | ||
273 | exp_orig->dir = IP_CT_DIR_ORIGINAL; | ||
274 | |||
275 | /* both expectations are identical apart from tuple */ | 273 | /* both expectations are identical apart from tuple */ |
276 | memcpy(exp_reply, exp_orig, sizeof(*exp_reply)); | 274 | memcpy(exp_reply, exp_orig, sizeof(*exp_reply)); |
277 | memcpy(&exp_reply->tuple, &exp_tuples[1], sizeof(exp_reply->tuple)); | 275 | memcpy(&exp_reply->tuple, &exp_tuples[1], sizeof(exp_reply->tuple)); |
278 | 276 | ||
279 | exp_reply->dir = !exp_orig->dir; | ||
280 | |||
281 | if (ip_nat_pptp_hook_exp_gre) | 277 | if (ip_nat_pptp_hook_exp_gre) |
282 | ret = ip_nat_pptp_hook_exp_gre(exp_orig, exp_reply); | 278 | ret = ip_nat_pptp_hook_exp_gre(exp_orig, exp_reply); |
283 | else { | 279 | else { |
diff --git a/net/ipv4/netfilter/ip_nat_helper_pptp.c b/net/ipv4/netfilter/ip_nat_helper_pptp.c index 3cdd0684d30d..ee6ab74ad3a9 100644 --- a/net/ipv4/netfilter/ip_nat_helper_pptp.c +++ b/net/ipv4/netfilter/ip_nat_helper_pptp.c | |||
@@ -216,6 +216,7 @@ pptp_exp_gre(struct ip_conntrack_expect *expect_orig, | |||
216 | expect_orig->saved_proto.gre.key = htons(nat_pptp_info->pac_call_id); | 216 | expect_orig->saved_proto.gre.key = htons(nat_pptp_info->pac_call_id); |
217 | expect_orig->tuple.src.u.gre.key = htons(nat_pptp_info->pns_call_id); | 217 | expect_orig->tuple.src.u.gre.key = htons(nat_pptp_info->pns_call_id); |
218 | expect_orig->tuple.dst.u.gre.key = htons(ct_pptp_info->pac_call_id); | 218 | expect_orig->tuple.dst.u.gre.key = htons(ct_pptp_info->pac_call_id); |
219 | expect_orig->dir = IP_CT_DIR_ORIGINAL; | ||
219 | inv_t.src.ip = reply_t->src.ip; | 220 | inv_t.src.ip = reply_t->src.ip; |
220 | inv_t.dst.ip = reply_t->dst.ip; | 221 | inv_t.dst.ip = reply_t->dst.ip; |
221 | inv_t.src.u.gre.key = htons(nat_pptp_info->pac_call_id); | 222 | inv_t.src.u.gre.key = htons(nat_pptp_info->pac_call_id); |
@@ -233,6 +234,7 @@ pptp_exp_gre(struct ip_conntrack_expect *expect_orig, | |||
233 | expect_reply->saved_proto.gre.key = htons(nat_pptp_info->pns_call_id); | 234 | expect_reply->saved_proto.gre.key = htons(nat_pptp_info->pns_call_id); |
234 | expect_reply->tuple.src.u.gre.key = htons(nat_pptp_info->pac_call_id); | 235 | expect_reply->tuple.src.u.gre.key = htons(nat_pptp_info->pac_call_id); |
235 | expect_reply->tuple.dst.u.gre.key = htons(ct_pptp_info->pns_call_id); | 236 | expect_reply->tuple.dst.u.gre.key = htons(ct_pptp_info->pns_call_id); |
237 | expect_reply->dir = IP_CT_DIR_REPLY; | ||
236 | inv_t.src.ip = orig_t->src.ip; | 238 | inv_t.src.ip = orig_t->src.ip; |
237 | inv_t.dst.ip = orig_t->dst.ip; | 239 | inv_t.dst.ip = orig_t->dst.ip; |
238 | inv_t.src.u.gre.key = htons(nat_pptp_info->pns_call_id); | 240 | inv_t.src.u.gre.key = htons(nat_pptp_info->pns_call_id); |