]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
connlabel: clarify default config path
authorFlorian Westphal <fw@strlen.de>
Wed, 20 Jul 2016 09:53:20 +0000 (11:53 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 18 Oct 2016 13:00:20 +0000 (15:00 +0200)
Pablo suggested to print full config file path for connlabel.conf
parsing errors.

Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_connlabel.c

index f6856453e4e33994ac7eddb1146b75813b464994..d06bb27a7c2e983bd97bcefe6841d65835123055 100644 (file)
@@ -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);
        }
 }