All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [nf-next PATCH] netfilter: nf_tables: Report transactions' process info to user space
Date: Mon, 15 May 2017 18:44:32 +0200	[thread overview]
Message-ID: <20170515164432.GL20805@orbyte.nwl.cc> (raw)
In-Reply-To: <20170515155331.GA32385@salvia>

On Mon, May 15, 2017 at 05:53:31PM +0200, Pablo Neira Ayuso wrote:
> On Mon, May 15, 2017 at 04:51:49PM +0200, Phil Sutter wrote:
> > When committing a transaction, report PID and name of user space process
> > which initiated it.
> > 
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > ---
> >  include/uapi/linux/netfilter/nf_tables.h | 16 +++++++++++
> >  net/netfilter/nf_tables_api.c            | 49 ++++++++++++++++++++++++++++++++
> >  2 files changed, 65 insertions(+)
> > 
> > diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
> > index 683f6f88fcace..7c012690a5f02 100644
> > --- a/include/uapi/linux/netfilter/nf_tables.h
> > +++ b/include/uapi/linux/netfilter/nf_tables.h
> > @@ -90,6 +90,7 @@ enum nft_verdicts {
> >   * @NFT_MSG_GETOBJ: get a stateful object (enum nft_obj_attributes)
> >   * @NFT_MSG_DELOBJ: delete a stateful object (enum nft_obj_attributes)
> >   * @NFT_MSG_GETOBJ_RESET: get and reset a stateful object (enum nft_obj_attributes)
> > + * @NFT_MSG_PROC_INFO: get info about user space process which initiated the transaction
> >   */
> >  enum nf_tables_msg_types {
> >  	NFT_MSG_NEWTABLE,
> > @@ -114,6 +115,7 @@ enum nf_tables_msg_types {
> >  	NFT_MSG_GETOBJ,
> >  	NFT_MSG_DELOBJ,
> >  	NFT_MSG_GETOBJ_RESET,
> > +	NFT_MSG_PROC_INFO,
> 
> No need for a new message. You can place this into existing the NEWGEN
> messages.

But that message is sent last and so at the time nft sees it, the events
will have been printed already, no?

Thanks, Phil

  reply	other threads:[~2017-05-15 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 14:51 [nf-next PATCH] netfilter: nf_tables: Report transactions' process info to user space Phil Sutter
2017-05-15 15:53 ` Pablo Neira Ayuso
2017-05-15 16:44   ` Phil Sutter [this message]
2017-05-15 17:54     ` Pablo Neira Ayuso
2017-05-19 10:41       ` Phil Sutter
2017-05-30 12:12         ` Pablo Neira Ayuso
2017-05-30 16:21           ` Phil Sutter
2017-05-30 19:19             ` Pablo Neira Ayuso
2017-06-06 11:39             ` Pablo Neira Ayuso

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=20170515164432.GL20805@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --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 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.