From: Patrick Schaaf <bof@bof.de>
To: "lartc@manchotnetworks.net" <lartc@manchotnetworks.net>
Cc: netfilter-devel <netfilter-devel@lists.netfilter.org>
Subject: Re: policy routing on locally generated packets
Date: Tue, 26 Aug 2003 13:09:13 +0200 [thread overview]
Message-ID: <20030826110913.GI423@oknodo.bof.de> (raw)
In-Reply-To: <1061887675.1273.37.camel@drs0.manchotnetworks.net>
Hi Charles,
> > What about mangle/PREROUTING? Doesn't it / shouldn't it sit before a
> > routing decision for locally generated packets?
> PREROUTING is "before" a routing decision. but only affects packets
> coming in over the wire, and not locally generated.
To me, it could/would be the most logical extension to make PREROUTING
also see outbound locally generated packets, before the routing step.
What do others think?
[snip per-uid accounting requirement]
> So I am searching for a hopefully simple way to implement this without
> having to recompile a bunch of stuff.
Your application would be far better served, IMHO, by a suitable, small
piece of code that does exactly what you need, instead of invoking complex
configuration all over the place.
First, the kernel already has a nice per-uid data structure, the
'struct user_struct'. It is used today to count the number of
processes a uid posesses. It could certainly be easily extended
with some counters. Second, those counters would get incremented
whenever a socket-using user level process sends or receives something.
Third, add some /proc/ file to read out the current counters, and a way
to reset the counters to 0.
Anybody here who A) needs the feature and B) has the skill to write the code?
If I'm not mistaken, it's 1-2 days of work.
best regards
Patrick
next prev parent reply other threads:[~2003-08-26 11:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-25 12:09 policy routing on locally generated packets lartc
2003-08-25 12:31 ` Patrick McHardy
2003-08-25 15:13 ` Patrick McHardy
2003-08-25 18:53 ` lartc
2003-08-25 19:07 ` Patrick Schaaf
2003-08-26 8:47 ` lartc
2003-08-26 11:09 ` Patrick Schaaf [this message]
2003-08-26 12:01 ` lartc
2003-08-26 12:14 ` Cedric de Launois
2003-08-26 18:47 ` lartc
2003-08-26 19:40 ` Henrik Nordstrom
2003-08-26 13:17 ` Patrick McHardy
2003-08-26 19:37 ` Henrik Nordstrom
2003-08-26 13:12 ` Patrick McHardy
2003-08-26 19:45 ` Henrik Nordstrom
2003-08-27 14:46 ` policy routing on locally generated packets [summary] lartc
2003-08-27 14:57 ` Patrick McHardy
2003-08-27 16:19 ` lartc
2003-08-27 14:58 ` Henrik Nordstrom
2003-08-26 13:06 ` policy routing on locally generated packets 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=20030826110913.GI423@oknodo.bof.de \
--to=bof@bof.de \
--cc=lartc@manchotnetworks.net \
--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.