diff options
author | Harald Welte <laforge@netfilter.org> | 2005-07-30 20:44:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-30 20:44:07 -0400 |
commit | 1f494c0e040b001cf844280910d04ba7ebdc2898 (patch) | |
tree | d7c6a20d5c37fbf90595e81a48688771225f8b0f /net/ipv4 | |
parent | d1b04c081e3fb0a08ac108737e4efa9f4830c916 (diff) |
[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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 86f04e41dd8e..a7f0c821a9b2 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -513,6 +513,11 @@ init_conntrack(const struct ip_conntrack_tuple *tuple, | |||
513 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK | 513 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK |
514 | conntrack->mark = exp->master->mark; | 514 | conntrack->mark = exp->master->mark; |
515 | #endif | 515 | #endif |
516 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
517 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | ||
518 | /* this is ugly, but there is no other place where to put it */ | ||
519 | conntrack->nat.masq_index = exp->master->nat.masq_index; | ||
520 | #endif | ||
516 | nf_conntrack_get(&conntrack->master->ct_general); | 521 | nf_conntrack_get(&conntrack->master->ct_general); |
517 | CONNTRACK_STAT_INC(expect_new); | 522 | CONNTRACK_STAT_INC(expect_new); |
518 | } else { | 523 | } else { |