Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3428c209 authored by Harald Welte's avatar Harald Welte Committed by Arnaldo Carvalho de Melo
Browse files

[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: default avatarYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 0bbacc40
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -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);