* early_drop() not working correctly?
@ 2006-07-06 14:24 Menno Smits
2006-07-06 14:41 ` Martijn Lievaart
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Menno Smits @ 2006-07-06 14:24 UTC (permalink / raw)
To: netfilter-devel
Hi list,
At one customer site we have a situation where a netfilter box sees half
of some connections due to asymmetric routing. This causes lots of
ESTABLISHED but unreplied connections to fill the conntrack table with
long (5 day) timeouts. Eventually the table completely fills up. The
"nf_conntrack: table full, dropping packet" message is reported, packets
are dropped and the customer starts complaining.
According to discussions with Patrick McHardy off list and my own
examinations of the code, early_drop() should free up some of the
conntrack table when the table is full by removing unreplied
connections. In practice, this doesn't actually happen.
I've experimented with a similar setup in the office and I can
consistently replicate the problem. I'm happy to describe my test setup
if anyone is interested (it's a little complicated).
Can someone explain why the unreplied connections aren't being removed
from the conntrack table? Is there a bug here?
Regards,
Menno
ps. We have worked around the issue at the client's site by using the
NOTRACK target for the asymmetrically routed traffic. Turning off TCP
connection pickup also works around the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: early_drop() not working correctly?
2006-07-06 14:24 early_drop() not working correctly? Menno Smits
@ 2006-07-06 14:41 ` Martijn Lievaart
2006-07-07 4:07 ` Patrick McHardy
2006-07-09 15:06 ` Jozsef Kadlecsik
2 siblings, 0 replies; 4+ messages in thread
From: Martijn Lievaart @ 2006-07-06 14:41 UTC (permalink / raw)
To: Menno Smits; +Cc: netfilter-devel
<citaat van="Menno Smits">
>
> ps. We have worked around the issue at the client's site by using the
> NOTRACK target for the asymmetrically routed traffic. Turning off TCP
> connection pickup also works around the problem.
IMHO that's not the workaround, that's how it should be setup. That does
not mean the bug is not real.
HTH,
M4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: early_drop() not working correctly?
2006-07-06 14:24 early_drop() not working correctly? Menno Smits
2006-07-06 14:41 ` Martijn Lievaart
@ 2006-07-07 4:07 ` Patrick McHardy
2006-07-09 15:06 ` Jozsef Kadlecsik
2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2006-07-07 4:07 UTC (permalink / raw)
To: Menno Smits; +Cc: netfilter-devel
Menno Smits wrote:
> Hi list,
>
> At one customer site we have a situation where a netfilter box sees half
> of some connections due to asymmetric routing. This causes lots of
> ESTABLISHED but unreplied connections to fill the conntrack table with
> long (5 day) timeouts. Eventually the table completely fills up. The
> "nf_conntrack: table full, dropping packet" message is reported, packets
> are dropped and the customer starts complaining.
>
> According to discussions with Patrick McHardy off list and my own
> examinations of the code, early_drop() should free up some of the
> conntrack table when the table is full by removing unreplied
> connections. In practice, this doesn't actually happen.
>
> I've experimented with a similar setup in the office and I can
> consistently replicate the problem. I'm happy to describe my test setup
> if anyone is interested (it's a little complicated).
I suggest adding some debugging printks to early_drop that dump the
other members of the hash chain and their flag values (epecially
IPS_ASSURED). Or simply to unreplied(). That should exlain what's
going on.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: early_drop() not working correctly?
2006-07-06 14:24 early_drop() not working correctly? Menno Smits
2006-07-06 14:41 ` Martijn Lievaart
2006-07-07 4:07 ` Patrick McHardy
@ 2006-07-09 15:06 ` Jozsef Kadlecsik
2 siblings, 0 replies; 4+ messages in thread
From: Jozsef Kadlecsik @ 2006-07-09 15:06 UTC (permalink / raw)
To: Menno Smits; +Cc: netfilter-devel
On Thu, 6 Jul 2006, Menno Smits wrote:
> At one customer site we have a situation where a netfilter box sees half
> of some connections due to asymmetric routing.
As it was already written, conntrack cannot reliably work in such setups.
> This causes lots of ESTABLISHED but unreplied connections to fill the
> conntrack table with long (5 day) timeouts. Eventually the table
> completely fills up. The "nf_conntrack: table full, dropping packet"
> message is reported, packets
> are dropped and the customer starts complaining.
>
> According to discussions with Patrick McHardy off list and my own
> examinations of the code, early_drop() should free up some of the
> conntrack table when the table is full by removing unreplied
> connections.
If you have got a pretty flat hash table (large hashsize parameter), then
early_drop has got bad chance to find any unreplied connection in the
given bucket. If you set hashsize relatively small (compared to the usual
traffic) then early_drop has got better chances but it hurts the
performance. I believe there is only bad and worse solutions to your
problem.
> In practice, this doesn't actually happen.
Sorry, but I think there should be more facts which supports your
assumption.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-09 15:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 14:24 early_drop() not working correctly? Menno Smits
2006-07-06 14:41 ` Martijn Lievaart
2006-07-07 4:07 ` Patrick McHardy
2006-07-09 15:06 ` Jozsef Kadlecsik
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.