pattern for regex and comment
2004-10-17 by Hajimu UMEMOTO
Hi,
A friend of mine found a problem. The following line causes parser
error:
addr 192.168.0.0/24 # http://localhost/
It seems that `addr 192.168.0.0' is matched with netblock as `ADDR IPADDR',
and `/24 # http:/' is matched with regex.
The following patch fixes it as workaround:
Index: conf_lex.l
diff -u conf_lex.l.orig conf_lex.l
--- conf_lex.l.orig Sun Oct 17 23:15:29 2004
+++ conf_lex.l Mon Oct 18 00:08:44 2004
@@ -40,7 +40,7 @@
all [Aa][Ll][Ll]
delay -?[0-9]+[smhdw]?
path "\""[^"\n]+"\""
-regex "/"[^/\n]+"/"
+regex "/"[^/#\n]+"/"
dumpfreq [Dd][Uu][Mm][Pp][Ff][Rr][Ee][Qq]:?
timeout [Tt][Ii][Mm][Ee][Oo][Uu][Tt]:?
domain [Dd][Oo][Mm][Aa][Ii][Nn]:?
Sincerely,
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@... ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/