From: Harald Welte <laforge@netfilter.org>
To: Marcelo Tossati <marcelo@conectiva.com.br>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>
Subject: [PATCH] MASQUERADE: inherit masq_index to slave connections
Date: Sat, 30 Jul 2005 16:00:43 +0200 [thread overview]
Message-ID: <20050730140043.GF6620@rama.de.gnumonks.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 514 bytes --]
Hi Marcelo!
Pleae apply the following trivial fix to your 2.4.x tree. I've already
submitted a 2.6.x fix for this to davem.
Thanks!
--
- Harald Welte <laforge@netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2: 19-masq_index-inheritance.patch --]
[-- Type: text/plain, Size: 1183 bytes --]
[NETFILTER] Inherit masq_index to slave connections
masq_index is used for cleanup in case the interface address changes
(such as a dialup ppp link with dynamic addreses). Without this patch,
slave connections are not evicted in such a case, since they don't inherit
masq_index.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Index: linux-2.4.31/net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
--- linux-2.4.31.orig/net/ipv4/netfilter/ip_conntrack_core.c 2005-04-04 03:42:20.000000000 +0200
+++ linux-2.4.31/net/ipv4/netfilter/ip_conntrack_core.c 2005-07-30 15:59:41.000000000 +0200
@@ -741,6 +741,11 @@
/* Welcome, Mr. Bond. We've been expecting you... */
__set_bit(IPS_EXPECTED_BIT, &conntrack->status);
conntrack->master = expected;
+#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \
+ defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE)
+ /* this is ugly, but there is no other place where to put it */
+ conntrack->nat.masq_index = expected->expectant->nat.masq_index;
+#endif
expected->sibling = conntrack;
LIST_DELETE(&ip_conntrack_expect_list, expected);
expected->expectant->expecting--;
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2005-07-30 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-30 14:00 Harald Welte [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-30 13:55 [PATCH] MASQUERADE: inherit masq_index to slave connections Harald Welte
2005-07-31 0:45 ` David S. Miller
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=20050730140043.GF6620@rama.de.gnumonks.org \
--to=laforge@netfilter.org \
--cc=marcelo@conectiva.com.br \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox