From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
"David S. Miller" <davem@davemloft.net>
Subject: [NETFILTER 4/8]: pptp helper: use locked variants of ip_conntrack_find_* functions
Date: Fri, 16 Sep 2005 00:44:48 +0200 [thread overview]
Message-ID: <4329F960.3060006@trash.net> (raw)
[-- Attachment #1: 04.diff --]
[-- Type: text/x-patch, Size: 2563 bytes --]
[NETFILTER]: pptp helper: use locked variants of ip_conntrack_find_* functions
ip_conntrack_lock is not held while the helper is running so it needs
to use the locked variants of __ip_conntrack_expect_find and
__ip_conntrack_find.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit f406547e6d2cee9aad722ef4cc48fd14c89ddf08
tree 1c3b6a32ab742bb76b90c8eb5c17529933ec0577
parent 1305f20c8446e6e944924a93eaf90e1896abf788
author Patrick McHardy <kaber@trash.net> Thu, 15 Sep 2005 23:14:31 +0200
committer Patrick McHardy <kaber@trash.net> Thu, 15 Sep 2005 23:14:31 +0200
net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 7 ++++---
net/ipv4/netfilter/ip_nat_helper_pptp.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
--- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
@@ -124,7 +124,7 @@ static void pptp_expectfn(struct ip_conn
DEBUGP("trying to unexpect other dir: ");
DUMP_TUPLE(&inv_t);
- exp_other = __ip_conntrack_expect_find(&inv_t);
+ exp_other = ip_conntrack_expect_find(&inv_t);
if (exp_other) {
/* delete other expectation. */
DEBUGP("found\n");
@@ -147,7 +147,7 @@ static int timeout_ct_or_exp(const struc
DEBUGP("trying to timeout ct or exp for tuple ");
DUMP_TUPLE(t);
- h = __ip_conntrack_find(t, NULL);
+ h = ip_conntrack_find_get(t, NULL);
if (h) {
struct ip_conntrack *sibling = tuplehash_to_ctrack(h);
DEBUGP("setting timeout of conntrack %p to 0\n", sibling);
@@ -155,9 +155,10 @@ static int timeout_ct_or_exp(const struc
sibling->proto.gre.stream_timeout = 0;
/* refresh_acct will not modify counters if skb == NULL */
ip_ct_refresh_acct(sibling, 0, NULL, 0);
+ ip_conntrack_put(sibling);
return 1;
} else {
- exp = __ip_conntrack_expect_find(t);
+ exp = ip_conntrack_expect_find(t);
if (exp) {
DEBUGP("unexpect_related of expect %p\n", exp);
ip_conntrack_unexpect_related(exp);
diff --git a/net/ipv4/netfilter/ip_nat_helper_pptp.c b/net/ipv4/netfilter/ip_nat_helper_pptp.c
--- a/net/ipv4/netfilter/ip_nat_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_nat_helper_pptp.c
@@ -101,7 +101,7 @@ static void pptp_nat_expected(struct ip_
DEBUGP("trying to unexpect other dir: ");
DUMP_TUPLE(&t);
- other_exp = __ip_conntrack_expect_find(&t);
+ other_exp = ip_conntrack_expect_find(&t);
if (other_exp) {
ip_conntrack_unexpect_related(other_exp);
ip_conntrack_expect_put(other_exp);
reply other threads:[~2005-09-15 22:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4329F960.3060006@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--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.