All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roberto Nibali <ratz@tac.ch>
To: Patrick Schaaf <bof@bof.de>
Cc: Harald Welte <laforge@netfilter.org>,
	Netfilter Developers <netfilter-devel@lists.netfilter.org>,
	Herve Eychenne <rv@wallfire.org>
Subject: Re: possible issues with blowing up struct ipt_log_info
Date: Mon, 04 Jul 2005 10:20:33 +0200	[thread overview]
Message-ID: <42C8F151.9080708@tac.ch> (raw)
In-Reply-To: <20050704055541.GA29624@oknodo.bof.de>

>>Trying to insert potentially many LOG rules to empirically determine
>>the maximum prefix length is far less complex, that's for sure. ;-)
> 
> Do we already have indeterminate log prefix length? I thought we had
> one, fixed size, no probing neccessary. Am I wrong?

No, it's fix. And "probing" can easily be done with a large sized prefix,
although I'm a bit astonished as to why someone wouldn't know the prefix size
when loading the packet filter ruleset.

>>For now, that's the only way an upper-level tool will produce valid
>>LOG rules in all cases.
>  
> The way to produce valid log rules in all cases, is to keep this
> fancy long long stuff in user level, and set pointer / index values
> or whatever small token can be used, for a log prefix in the kernel.

This does not work in environments where you need high speed logging since
having a pointer, or hashmap value, would require an intermediate process to
translate it into parsable strings again. This is from an architectural point of
view and from a performance point of view not possible, at least not in our
environment.

> Any scheme which probes the possible length, will also need some
> fallback when kernel length is smaller than user desire. If your
> goal is 'valid in all cases'. Right? Then you'll need such a
> token/pointer approach anyway!

The fallback is as it always was, exit with return value 2. Nothing changes. The
token/pointer approach is not something the netfilter architecture can provide
for you. That's something each packet filter software would have to provide by
itself. Example:

# A filter rule could expand into a ruleset where on of the rules could be
iptables -t filter -A INPUT -j LOG -i eth0 --log-level info --log-prefix
'ptr_666' -p icmp --icmp-type 8 -s 172.23.120.30/32 -d 172.23.120.120 -m state
--state NEW

# The ptr_666 is a pointer which can be translated again into human readable
# or log parsable strings.
ptr_666="pf rule set, ABI/55: icmp_from_fw [666] a:ACCEPT s:NEW f:INPUT TRACK
sub referenced as group"

>>Maybe you don't like /proc, but the kernel still has to provide a way
>>to inform userspace about the fixed size of some of its data (as
>>kernelspace doesn't like dynamic things very much...). If you see a
>>better way, that's ok, but the need is still there.
>  
> If getsockopt is good to communicate iptables rules and other stuff,
> it must be good enough to also communicate 'length of X is Y'...

Well, good enough is a relative term :), but the netfilter core team is working
extra hours on the netlink integration which could help a lot in this
perspective. It would be a lot more fun to get the connection tracking table
filled with thousands of entries in less than 2 Minutes, so the monitoring
system does not have so many spikes. Customers often ask if the system is
malfunctioning or down every 5-15 Minutes :).

Regards,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------

  reply	other threads:[~2005-07-04  8:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-29 15:37 possible issues with blowing up struct ipt_log_info Roberto Nibali
2005-06-29 15:40 ` Patrick Schaaf
2005-06-29 16:08   ` Roberto Nibali
2005-06-29 16:09   ` Herve Eychenne
2005-07-01  7:08     ` Roberto Nibali
2005-07-03 12:36     ` Harald Welte
2005-07-03 22:05       ` Herve Eychenne
2005-07-04  5:55         ` Patrick Schaaf
2005-07-04  8:20           ` Roberto Nibali [this message]
2005-07-04  8:59             ` Harald Welte
2005-07-04  9:26               ` Roberto Nibali
2005-07-04  9:53                 ` Harald Welte
2005-07-04 10:13                   ` Roberto Nibali
2005-07-04 10:08             ` Herve Eychenne
2005-07-04 10:48               ` Roberto Nibali
2005-07-04 11:21                 ` Herve Eychenne
2005-07-04  9:23           ` Herve Eychenne

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=42C8F151.9080708@tac.ch \
    --to=ratz@tac.ch \
    --cc=bof@bof.de \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rv@wallfire.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.