netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iptables] connlabel: clarify default config path
@ 2016-07-20  9:58 Florian Westphal
  2016-07-20 16:22 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2016-07-20  9:58 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

Pablo suggested to print full config file path for connlabel.conf
parsing errors.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 Pablo,

 I could also add the suggested nfct_labels_get_path() to lnf_conntrack
 but that means next iptables-release depends on a new library version.
 Given this name is set in stone anyway I would prefer this patch instead.

 Let me know, thanks.
 I will send a separate patch to change nftables location.

diff --git a/extensions/libxt_connlabel.c b/extensions/libxt_connlabel.c
index 7e4ff26..728f6ac 100644
--- a/extensions/libxt_connlabel.c
+++ b/extensions/libxt_connlabel.c
@@ -34,6 +34,8 @@ static const struct xt_option_entry connlabel_mt_opts[] = {
  */
 static void connlabel_open(void)
 {
+	static const char fname[]="/etc/xtables/connlabel.conf";
+
 	if (map)
 		return;
 
@@ -43,10 +45,10 @@ static void connlabel_open(void)
 
 	if (errno) {
 		xtables_error(RESOURCE_PROBLEM,
-			"cannot open connlabel.conf: %s", strerror(errno));
+			"cannot open %s: %s", fname, strerror(errno));
 	} else {
 		xtables_error(RESOURCE_PROBLEM,
-			"cannot parse label, maybe valid label map is empty");
+			"cannot parse %s: no labels found", fname);
 	}
 }
 
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iptables] connlabel: clarify default config path
  2016-07-20  9:58 [PATCH iptables] connlabel: clarify default config path Florian Westphal
@ 2016-07-20 16:22 ` Pablo Neira Ayuso
  2016-07-20 16:31   ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2016-07-20 16:22 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Wed, Jul 20, 2016 at 11:58:24AM +0200, Florian Westphal wrote:
> Pablo suggested to print full config file path for connlabel.conf
> parsing errors.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  Pablo,
> 
>  I could also add the suggested nfct_labels_get_path() to lnf_conntrack
>  but that means next iptables-release depends on a new library version.
>  Given this name is set in stone anyway I would prefer this patch instead.
> 
>  Let me know, thanks.
>  I will send a separate patch to change nftables location.

We'll have a release of iptables 1.6.1 soon. Pablo Bermudo is working
on making sure that the interaction between nftables and
iptables-compat is fine.

And libnetfilter_conntrack is coming with IPv6 NAT support.

So I can schedule a release before end of this week / beginning next
weekend with accumulated updates so this comes in the next release.

Thanks for working on this!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH iptables] connlabel: clarify default config path
  2016-07-20 16:22 ` Pablo Neira Ayuso
@ 2016-07-20 16:31   ` Florian Westphal
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2016-07-20 16:31 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> And libnetfilter_conntrack is coming with IPv6 NAT support.

Ah, I forgot about this.

> So I can schedule a release before end of this week / beginning next
> weekend with accumulated updates so this comes in the next release.

Ok, I will send a patch for lnf-conntrack and iptables later today.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-20 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20  9:58 [PATCH iptables] connlabel: clarify default config path Florian Westphal
2016-07-20 16:22 ` Pablo Neira Ayuso
2016-07-20 16:31   ` Florian Westphal

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).