From 1ffa23d53cd9bacc272848c92823c1e2c8c71fed Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 20 Jul 2016 11:53:20 +0200 Subject: connlabel: clarify default config path Pablo suggested to print full config file path for connlabel.conf parsing errors. Suggested-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- extensions/libxt_connlabel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/libxt_connlabel.c b/extensions/libxt_connlabel.c index f6856453..d06bb27a 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) { + const char *fname; + if (map) return; @@ -41,12 +43,13 @@ static void connlabel_open(void) if (map != NULL) return; + fname = nfct_labels_get_path(); 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); } } -- cgit v1.2.3