Linux Netfilter development
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Krzysztof Oledzki <ole@ans.pl>
Cc: Jan Engelhardt <jengelh@medozas.de>,
	pablo@netfilter.org,
	Netfilter Developer Mailing List
	<netfilter-devel@vger.kernel.org>
Subject: Re: nf_conntrack.acct has no effect
Date: Tue, 17 Mar 2009 15:22:15 +0100	[thread overview]
Message-ID: <49BFB217.9050001@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0903171505320.14581@bizon.gios.gov.pl>

Krzysztof Oledzki wrote:
> 
> 
> On Tue, 17 Mar 2009, Patrick McHardy wrote:
> 
>> Krzysztof Oledzki wrote:
>>>
>>>
>>> On Tue, 17 Mar 2009, Patrick McHardy wrote:
>>>
>>>> Krzysztof Oledzki wrote:
>>>>>> I'd say it has been long enough, but Jan raised a valid point.
>>>>>> We can't use the Kconfig selection anymore once we remove that
>>>>>> option, so we need a replacement to automatically enable counters.
>>>>>
>>>>> So loading connbytes should enable accounting automatically. Fine, 
>>>>> it is doable. But how we want to handle it WRT to NS? Should it be 
>>>>> enabled in all NameSpaces or...?
>>>>
>>>> Just the ones it is actually used in I'd say (i.e. in the checkentry
>>>> function for the current namespace).
>>>
>>> OK, but AFAIK modules are not namespace dependly, so why only in 
>>> actually used one? This bugs me a little.
>>
>> But using them is namespace dependant.
> 
> How?

The "connbytes" rules exist only in a specific namespace.

> Anyway, how about this:
>  sysctl net.netfilter.nf_conntrack_acct=0 -> disable accounting in this NS
>  sysctl net.netfilter.nf_conntrack_acct=1 -> enable accounting in this NS
>  sysctl net.netfilter.nf_conntrack_acct=-1 -> (default) use global value 
> in this NS
> 
> Global value: by default 0 if connbytes is not loaded, 1 if it is.
> Global value could be set with nf_conntrack.acct=0/1 (kernel) acct=0/1 
> (module) or sysctl (??? how global, NS independent sysctls are named???).
> 
> Doubts:
>  - should we set global value to 0 when unloading connbytes?

Why do anything global at all? Its not needed unless connbytes is used
(or something in userspace, which we can't detect), and that affects
only a single namespace.

  reply	other threads:[~2009-03-17 14:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 16:53 nf_conntrack.acct has no effect Jan Engelhardt
2009-03-16 16:56 ` Patrick McHardy
2009-03-16 18:01   ` Jan Engelhardt
2009-03-17  8:24   ` Holger Eitzenberger
2009-03-17 13:02     ` Patrick McHardy
2009-03-17 13:13       ` Krzysztof Oledzki
2009-03-17 13:31         ` Patrick McHardy
2009-03-17 13:32           ` Patrick McHardy
2009-03-17 13:50           ` Krzysztof Oledzki
2009-03-17 13:51             ` Patrick McHardy
2009-03-17 13:55               ` Krzysztof Oledzki
2009-03-17 13:57                 ` Patrick McHardy
2009-03-17 14:18                   ` Krzysztof Oledzki
2009-03-17 14:22                     ` Patrick McHardy [this message]
2009-03-17 14:36                       ` Krzysztof Oledzki
2009-03-17 14:38                         ` Patrick McHardy
2009-03-17 13:11     ` Krzysztof Oledzki
2009-03-17 13:28       ` Jan Engelhardt
2009-03-17 13:52         ` Krzysztof Oledzki
2009-03-17 13:54           ` Patrick McHardy
2009-03-17 14:39         ` Jan Engelhardt
2009-03-17 14:41           ` Patrick McHardy
2009-03-17 15:41             ` Jan Engelhardt
2009-03-18  4:32               ` Patrick McHardy

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=49BFB217.9050001@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ole@ans.pl \
    --cc=pablo@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