From 76c9410deecb8dc4689d941383d6a79336e6bfc7 Mon Sep 17 00:00:00 2001
From: Marek Vavrusa <marek.vavrusa@nic.cz>
Date: Wed, 31 Aug 2011 19:16:05 +0200
Subject: [PATCH] Allowed underscore in TEXT token, updated knot.sample.conf to
 reflect changes in ACL matching.

---
 samples/knot.sample.conf | 16 +++++-----------
 src/knot/conf/cf-lex.l   |  2 +-
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/samples/knot.sample.conf b/samples/knot.sample.conf
index 174aeb296e..6af92fcfc0 100644
--- a/samples/knot.sample.conf
+++ b/samples/knot.sample.conf
@@ -80,15 +80,9 @@ remotes {
   }
 
   # Format 2: <name> { address <address>@<port>; }
-  server1 {
-    address 127.0.0.1@53001;
-  }
-
-  # Format 3: ACL without port (for xfr-out and notify-out) 
-  acl1 {
-    address 127.0.0.1;
-  }
-
+  # server1 {
+  #  address 127.0.0.1@53001;
+  # }
 }
 
 # Section 'zones' contains information about zones to be served.
@@ -161,10 +155,10 @@ zones {
     xfr-in server0;
 
     # ACL list of XFR slaves 
-    xfr-out acl1;
+    xfr-out server0;
 
     # ACL list of servers allowed to send NOTIFY queries 
-    notify-in acl1;
+    notify-in server0;
 
     # List of servers to send NOTIFY to 
     notify-out server0;
diff --git a/src/knot/conf/cf-lex.l b/src/knot/conf/cf-lex.l
index fe2d73876a..ef748d3e13 100644
--- a/src/knot/conf/cf-lex.l
+++ b/src/knot/conf/cf-lex.l
@@ -205,7 +205,7 @@ hmac-sha512     { lval.alg = HMAC_SHA512; return TSIG_ALGO_NAME; }
 
 ["][^"\n]*\n    cf_error(yyscanner, "Unterminated string.");
 
-[a-zA-Z0-9\.\-]+ {
+[a-zA-Z0-9\.\-\_]+ {
   lval.t = strdup(yytext);
   return TEXT /* Last resort, alphanumeric word. */;
 }
-- 
GitLab