netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH 3/5] extensions: connlabel: Allow connlabel.conf override
Date: Fri, 1 Mar 2019 19:08:15 +0100	[thread overview]
Message-ID: <20190301180815.GJ2478@orbyte.nwl.cc> (raw)
In-Reply-To: <20190301125209.6iuqkspstwsn4724@salvia>

Hi Pablo,

On Fri, Mar 01, 2019 at 01:52:09PM +0100, Pablo Neira Ayuso wrote:
> Hi Phil,
> 
> On Tue, Feb 19, 2019 at 08:39:51PM +0100, Phil Sutter wrote:
> > Check for environment variable XT_CONNLABEL_CFG and if set use its value
> > as path to connlabel.conf.
> > 
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > ---
> >  extensions/libxt_connlabel.c   | 6 ++++--
> >  extensions/libxt_connlabel.man | 2 ++
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/extensions/libxt_connlabel.c b/extensions/libxt_connlabel.c
> > index d06bb27a7c2e9..9a2f9ce34647e 100644
> > --- a/extensions/libxt_connlabel.c
> > +++ b/extensions/libxt_connlabel.c
> > @@ -3,6 +3,7 @@
> >  #include <string.h>
> >  #include <stdio.h>
> >  #include <stdint.h>
> > +#include <stdlib.h>
> >  #include <xtables.h>
> >  #include <linux/netfilter/xt_connlabel.h>
> >  #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
> > @@ -39,11 +40,12 @@ static void connlabel_open(void)
> >  	if (map)
> >  		return;
> >  
> > -	map = nfct_labelmap_new(NULL);
> > +	fname = getenv("XT_CONNLABEL_CFG") ?: nfct_labels_get_path();
> 
> Only one question about this one: Would you need anything similar for
> nft? If so, probably it's better to place this code in
> libnetfilter_conntrack.

I guess not: In nftables, /etc/connlabel.conf is manually parsed via
call to rt_symbol_table_init(). So while I could add the above to
libnetfilter_conntrack, it wouldn't affect nftables.

Cheers, Phil

  reply	other threads:[~2019-03-01 18:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190219193953.29066-1-phil@nwl.cc>
     [not found] ` <20190219193953.29066-4-phil@nwl.cc>
2019-03-01 12:52   ` [iptables PATCH 3/5] extensions: connlabel: Allow connlabel.conf override Pablo Neira Ayuso
2019-03-01 18:08     ` Phil Sutter [this message]
     [not found] ` <20190219193953.29066-6-phil@nwl.cc>
2019-03-03 21:03   ` [iptables PATCH 5/5] iptables-test: Make use of sample connlabel.conf Florian Westphal
2019-03-04 12:43     ` Phil Sutter
2019-03-04 13:07       ` Pablo Neira Ayuso
2019-03-04 14:59         ` Phil Sutter
2019-03-04 15:02           ` Florian Westphal
2019-03-04 15:53             ` [iptables PATCH] extensions: connlabel: Fallback on missing connlabel.conf Phil Sutter
2019-03-08 19:20               ` Florian Westphal
2019-03-08 18:12           ` [iptables PATCH 5/5] iptables-test: Make use of sample connlabel.conf Pablo Neira Ayuso
2019-03-09 10:51             ` [libnetfilter_conntrack PATCH] Rename 'qa' directory to 'tests' Phil Sutter
2019-03-09 10:56               ` [libnetfilter_conntrack PATCH v2] " Phil Sutter
2019-03-11 12:36                 ` 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=20190301180815.GJ2478@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --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).