From: Philip Craig <philipc@snapgear.com>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel <netfilter-devel@lists.netfilter.org>
Subject: Re: PPTP connection tracking and Poptop on same box
Date: Tue, 09 Sep 2003 18:39:56 +1000 [thread overview]
Message-ID: <3F5D91DC.3030706@snapgear.com> (raw)
In-Reply-To: <20030905115534.GD665@obroa-skai.de.gnumonks.org>
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Hi Harald,
Harald Welte wrote:
> I'm sorry for this whole mess. Releasing a new version of the
> pptp-conntrack-nat patch is on my TODO list for quite some time. I'll
> expect it to be done during the next week.
When you do this, you will need the attached patches. Jeff Hall
posted them to the list on 2003/04/08, but I couldn't find them
in the netfilter CVS anywhere.
natcore-noexpecthelper.patch is related to 25natcore-nohelper.patch
which was applied in 2.4.22. 25natcore-nohelper.patch stopped us
from calling ip_nat_helper->help() when there were no manips, but
we were still calling ip_nat_helper->expect(). This was corrupting
the call IDs in the GRE packets.
pptp-grekeymapdestroy.patch does some more cleaning up when freeing
the unused second expectation.
I now have pptp connection tracking working using linux 2.4.22,
the latest patch from netfilter/patch-o-matic/extra, the latest
files from netfilter-extensions/helpers/pptp, and the attached
two patches.
I have two concerns with the current patches:
25natcore-nohelper.patch fixed the problem where we were doing
NAT for connections even if there was no matching NAT rules.
However, we now have the opposite problem in that we don't do
NAT even if we should. This is because this patch bases the
decision on the number of manipulations, but it is possible to
match a NAT rule and have no manipulations.
The impact of this is that I cannot guarentee unique call IDs for
local connections when doing masquerading, since they usually have
no manipulations (they will occassionally have a port manip).
The only solution I can see for this problem is to add another
field to ip_nat_info to determine whether a NAT rule was matched.
The second concern is that I believe we choose the NATed call ID
based on the TCP source port prior to source NAT, which means we
may not get a unique call ID. If you agree this is a problem
then I can try to fix it.
--
Philip Craig - philipc@snapgear.com - http://www.SnapGear.com
SnapGear - Custom Embedded Solutions and Security Appliances
[-- Attachment #2: natcore-noexpecthelper.patch --]
[-- Type: text/plain, Size: 644 bytes --]
--- linux-2.4.x/net/ipv4/netfilter/ip_nat_standalone.c 25 Jun 2003 13:50:47 -0000 1.5
+++ linux-2.4.x/net/ipv4/netfilter/ip_nat_standalone.c 5 Sep 2003 05:29:24 -0000 1.6
@@ -121,8 +121,13 @@
if (ct->master
&& master_ct(ct)->nat.info.helper
&& master_ct(ct)->nat.info.helper->expect) {
- ret = call_expect(master_ct(ct), pskb,
+ if (master_ct(ct)->nat.info.num_manips) {
+ ret = call_expect(master_ct(ct), pskb,
hooknum, ct, info);
+ } else {
+ WRITE_UNLOCK(&ip_nat_lock);
+ return NF_ACCEPT;
+ }
} else {
#ifdef CONFIG_IP_NF_NAT_LOCAL
/* LOCAL_IN hook doesn't have a chain! */
[-- Attachment #3: pptp-grekeymapdestroy.patch --]
[-- Type: text/plain, Size: 448 bytes --]
--- linux-2.4.x/net/ipv4/netfilter/ip_conntrack_pptp.c 5 Sep 2003 04:24:24 -0000 1.12
+++ linux-2.4.x/net/ipv4/netfilter/ip_conntrack_pptp.c 5 Sep 2003 05:29:24 -0000 1.13
@@ -124,6 +124,7 @@
/* remove only if occurred at same sequence number */
if (other_exp != exp && other_exp->seq == exp->seq) {
DEBUGP("unexpecting other direction\n");
+ ip_ct_gre_keymap_destroy(exp);
ip_conntrack_unexpect_related(other_exp);
}
}
next prev parent reply other threads:[~2003-09-09 8:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 5:36 PPTP connection tracking and Poptop on same box Menno Smits
2003-09-03 23:21 ` Jeff Hall
2003-09-04 6:59 ` Menno Smits
2003-09-04 8:04 ` Jeff Hall
2003-09-04 12:16 ` Wim Ceulemans
2003-09-04 23:57 ` Jeff Hall
2003-09-05 0:21 ` Menno Smits
2003-09-05 11:55 ` Harald Welte
2003-09-08 0:58 ` Menno Smits
2003-09-18 7:28 ` Wim Ceulemans
2003-09-18 23:57 ` Menno Smits
2003-09-09 8:39 ` Philip Craig [this message]
2003-09-21 14:05 ` Harald Welte
2003-09-22 8:06 ` Philip Craig
2003-09-22 8:52 ` Harald Welte
2003-09-21 22:48 ` Harald Welte
-- strict thread matches above, loose matches on Subject: below --
2003-09-02 23:25 Menno Smits
2004-01-18 23:00 Carl Farrington
2004-01-18 23:38 ` Antony Stone
[not found] <739652C2AFA4834AAB5986A215F68CEC4977@svr1.home.compsup.net>
2004-01-19 0:03 ` Antony Stone
2004-01-27 2:00 ` Harald Welte
2004-01-19 16:23 Carl Farrington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F5D91DC.3030706@snapgear.com \
--to=philipc@snapgear.com \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.