Netdev List
 help / color / mirror / Atom feed
* [PATCH 4/3] NETFILTER: New PPTP helper
@ 2005-09-15 14:59 Harald Welte
  2005-09-15 20:09 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Harald Welte @ 2005-09-15 14:59 UTC (permalink / raw)
  To: David Miller; +Cc: Linux Netdev List, Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

Hi Dave, please push this important fix to mainline.  Thanks!


[NETFILTER] Fix oops in conntrack event cache

ip_ct_refresh_acct() can be called without a valid "skb" pointer.  This
used to work, since ct_add_counters() deals with that fact.  However, the
recently-added event cache doesn't handle this at all.

This patch is a quick fix that is supposed to be replaced soon by a cleaner
solution during the pending redesign of the event cache.

Signed-off-by: Harald Welte <laforge@netfilter.org>

---
commit 8fc09611c23e90f8d2e85a38850f97f5c615b7da
tree caff72b73bdad20fa4f6832a4d9028a69307b2b6
parent 6a31666e4f67a3eec97274b4aa8c245d06cd4fd3
author Harald Welte <laforge@netfilter.org> Do, 15 Sep 2005 16:58:12 +0200
committer Harald Welte <laforge@netfilter.org> Do, 15 Sep 2005 16:58:12 +0200

 net/ipv4/netfilter/ip_conntrack_core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1143,7 +1143,10 @@ void ip_ct_refresh_acct(struct ip_conntr
 		if (del_timer(&ct->timeout)) {
 			ct->timeout.expires = jiffies + extra_jiffies;
 			add_timer(&ct->timeout);
-			ip_conntrack_event_cache(IPCT_REFRESH, skb);
+			/* FIXME: We loose some REFRESH events if this function
+			 * is called without an skb.  I'll fix this later -HW */
+			if (skb)
+				ip_conntrack_event_cache(IPCT_REFRESH, skb);
 		}
 		ct_add_counters(ct, ctinfo, skb);
 		write_unlock_bh(&ip_conntrack_lock);
-- 
- 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 #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-15 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15 14:59 [PATCH 4/3] NETFILTER: New PPTP helper Harald Welte
2005-09-15 20:09 ` David S. Miller
2005-09-15 20:53   ` Harald Welte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox