[NETFILTER] PPTP helper: Fix compilation of conntrack helper without NAT
authorHarald Welte <laforge@netfilter.org>
Thu, 3 Nov 2005 13:27:07 +0000 (14:27 +0100)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Sat, 5 Nov 2005 01:02:53 +0000 (23:02 -0200)
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>
net/ipv4/netfilter/ip_conntrack_helper_pptp.c
net/ipv4/netfilter/ip_nat_helper_pptp.c

index 926a6684643dd0caf3d5378651fbfaf28097bb0c..4108a5e12b3c3d702bcd8211533ac4bee00ea3f7 100644 (file)
@@ -270,14 +270,10 @@ exp_gre(struct ip_conntrack *master,
        exp_orig->expectfn = pptp_expectfn;
        exp_orig->flags = 0;
 
-       exp_orig->dir = IP_CT_DIR_ORIGINAL;
-
        /* both expectations are identical apart from tuple */
        memcpy(exp_reply, exp_orig, sizeof(*exp_reply));
        memcpy(&exp_reply->tuple, &exp_tuples[1], sizeof(exp_reply->tuple));
 
-       exp_reply->dir = !exp_orig->dir;
-
        if (ip_nat_pptp_hook_exp_gre)
                ret = ip_nat_pptp_hook_exp_gre(exp_orig, exp_reply);
        else {
index 3cdd0684d30d32242963309f35941c123f041504..ee6ab74ad3a91e7c03451c37873a3597e5fa4764 100644 (file)
@@ -216,6 +216,7 @@ pptp_exp_gre(struct ip_conntrack_expect *expect_orig,
        expect_orig->saved_proto.gre.key = htons(nat_pptp_info->pac_call_id);
        expect_orig->tuple.src.u.gre.key = htons(nat_pptp_info->pns_call_id);
        expect_orig->tuple.dst.u.gre.key = htons(ct_pptp_info->pac_call_id);
+       expect_orig->dir = IP_CT_DIR_ORIGINAL;
        inv_t.src.ip = reply_t->src.ip;
        inv_t.dst.ip = reply_t->dst.ip;
        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,
        expect_reply->saved_proto.gre.key = htons(nat_pptp_info->pns_call_id);
        expect_reply->tuple.src.u.gre.key = htons(nat_pptp_info->pac_call_id);
        expect_reply->tuple.dst.u.gre.key = htons(ct_pptp_info->pns_call_id);
+       expect_reply->dir = IP_CT_DIR_REPLY;
        inv_t.src.ip = orig_t->src.ip;
        inv_t.dst.ip = orig_t->dst.ip;
        inv_t.src.u.gre.key = htons(nat_pptp_info->pns_call_id);