netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Arturo Borrero Gonzalez <arturo@debian.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>,
	Florian Westphal <fw@strlen.de>
Subject: Re: [nft PATCH RFC] monitor: Support printing processes which caused the event
Date: Wed, 10 May 2017 16:02:44 +0200	[thread overview]
Message-ID: <20170510140244.GW20805@orbyte.nwl.cc> (raw)
In-Reply-To: <CAOkSjBhBTB8uDspnqx7F9vHt0GcCeAyt_3e+Lzm5nMG9pQKnOA@mail.gmail.com>

On Wed, May 10, 2017 at 02:52:49PM +0200, Arturo Borrero Gonzalez wrote:
> On 10 May 2017 at 12:55, Phil Sutter <phil@nwl.cc> wrote:
> > This adds support for printing the process ID and name for changes which
> > 'nft monitor' reports:
> >
> > | nft -a -p monitor
> > | add chain ip t2 bla3 # pid 11616 (nft)
> >
> > If '-n' was given in addition to '-p', parsing the process name from
> > /proc/<pid>/cmdline is suppressed.
> >
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > Cc: Florian Westphal <fw@strlen.de>
> > ---
> >  include/nftables.h |  1 +
> >  src/main.c         | 12 ++++++++++-
> >  src/netlink.c      | 60 +++++++++++++++++++++++++++++++++++++++++++++++++-----
> >  src/rule.c         |  2 --
> >  4 files changed, 67 insertions(+), 8 deletions(-)
> >
> 
> If you are about to parse the textual nft output anyway, (which
> doesn't seems like a good idea BTW),
> why you don't simply add a rule comment?:
> 
> % nft add rule inet filter input counter comment "added by my app"

Sometimes you don't control the instance adding the rule, then this is
not an option.

Cheers, Phil

      reply	other threads:[~2017-05-10 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 10:55 [nft PATCH RFC] monitor: Support printing processes which caused the event Phil Sutter
2017-05-10 11:27 ` Florian Westphal
2017-05-10 11:38   ` Pablo Neira Ayuso
2017-05-10 11:57     ` Florian Westphal
2017-05-10 14:39       ` Phil Sutter
2017-05-10 14:54         ` Florian Westphal
2017-05-10 15:11           ` Phil Sutter
2017-05-10 17:59             ` Florian Westphal
2017-05-11  6:41               ` Pablo Neira Ayuso
2017-05-11  6:59                 ` Florian Westphal
2017-05-11  8:27                   ` Phil Sutter
2017-05-11  9:58                     ` Pablo Neira Ayuso
2017-05-11  9:59                   ` Pablo Neira Ayuso
2017-05-10 11:34 ` Pablo Neira Ayuso
2017-05-10 12:52 ` Arturo Borrero Gonzalez
2017-05-10 14:02   ` Phil Sutter [this message]

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=20170510140244.GW20805@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=arturo@debian.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).