All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: Re: [RFC] [PATCH] clean up nf_log API
Date: Thu, 11 May 2006 10:39:41 +0200	[thread overview]
Message-ID: <4462F84D.5000100@trash.net> (raw)
In-Reply-To: <20060511082555.GB10324@sunbeam.de.gnumonks.org>

Harald Welte wrote:
> On Thu, May 11, 2006 at 08:56:49AM +0200, Patrick McHardy wrote:
> 
> 
>>That all sounds very reasonable. How is the priority of a backend
>>determined?
> 
> 
> statically.  nfnetlink_log overrules ULOG, which overrules LOG.
> 
> We could make that configurable, but I think that's too much
> flexibility.  If a user _wants_ a specific backend, he can chose it. if
> not, we'll fallback on something.


I'm not sure about this. I assume a user would choose the backend
by specifying extra arguments to the NFLOG target, but that isn't
possible for internal logging.

>>>b) reference counting.  We could actually get_module / put_module the
>>>   module that implements a specific backend rather than using our own
>>>   use counter.
>>
>>I guess it depends on whether we want to block unloading while it is
>>in use or do automatic fallback. I tend to prefer the later.
> 
> 
> I agree, I prefer automatic fallback while giving the user the ability
> to unload.  However, if people automatically unload 'unused' modules,
> then there might be a problem (however, for both ULOG and nfnetlink_log,
> userspace listeners would increment the refcount, I think).


Do people still do that? I think distributions stopped the
"rmmod -something" triggered by cron a long time ago.
Anyway, netlink listeners will keep the module pinned.


> Also, there is another unresolved problem:  What if we actually have
> e.g. nfnetlink_log loaded, but it is unable to send a specific packet to
> userspace because there is no listener for this Address family or log
> group?   Should we then also fall back on some other backend?
> 
> At the moment we only fall back if a backend is unbound, but not if it
> e.g. returns an error code because it was unable to log a specific
> packet.


If the user explicitly specifies the backend we shouldn't fall back.
Otherwise I'm not sure .. it probably makes sense as long as we don't
permanently disable the higher priority backend.

BTW, I have a patch queued for 2.6.18 that makes the logging functions
return a status. I guess your patch already includes that, shall
I drop my patch?

  reply	other threads:[~2006-05-11  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 19:10 [RFC] [PATCH] clean up nf_log API Harald Welte
2006-05-11  5:36 ` Gregor Maier
2006-05-11  8:39   ` Harald Welte
2006-05-11  8:44     ` Patrick McHardy
2006-05-11  8:59       ` Holger Eitzenberger
2006-05-11 11:55         ` Harald Welte
2006-05-11  6:56 ` Patrick McHardy
2006-05-11  8:25   ` Harald Welte
2006-05-11  8:39     ` Patrick McHardy [this message]
2006-05-11  8:58     ` Philip Craig
2006-05-11  8:54 ` Holger Eitzenberger

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=4462F84D.5000100@trash.net \
    --to=kaber@trash.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.