Commit Diff
Diff:
ba97ed104764d5410da915ecaae6461ae2524b6e
44be7f81e1904ffa21241cd9e694e79cdff78e55
Commit:
44be7f81e1904ffa21241cd9e694e79cdff78e55
Tree:
7bf8b1085b3aefc586e96b90b8e415b36548206a
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Wed Apr 16 07:19:04 2014 UTC
Message:
* this fixes options that have a newline between them
blob - 4bd1aee705eacc929756b177edc869f99d0412bd
blob + 21fb7d317d70b85859c4b92739f3521cc6a14f2a
--- example8.conf
+++ example8.conf
@@ -5,9 +5,12 @@ version "6";
options "cool stuff" {
interface "lo0";
interface "re0";
+
;bind 127.0.0.1;
;bind 192.168.34.4;
+
port 10034;
+
;fork 2;
log;
}
blob - 1a18fecf2edff84b59d79e50b500ca202788c586
blob + 7795aa414ca235be30f80726ad1d5893f9426fb0
--- parse.y
+++ parse.y
@@ -58,7 +58,7 @@ typedef struct {
int lineno;
} YYSTYPE;
-static const char rcsid[] = "$Id: parse.y,v 1.11 2014/04/15 19:59:46 pjp Exp $";
+static const char rcsid[] = "$Id: parse.y,v 1.12 2014/04/16 07:19:04 pjp Exp $";
static int version = 0;
static int state = 0;
static uint8_t region = 0;
@@ -507,13 +507,13 @@ optionscontent:
;
optionsstatements:
- optionsstatement CRLF
- | optionsstatements optionsstatement CRLF
+ optionsstatement
+ | optionsstatements optionsstatement
;
optionsstatement:
- STRING SEMICOLON
+ STRING SEMICOLON CRLF
{
if (strcasecmp($1, "recurse") == 0) {
dolog(LOG_DEBUG, "recursive server on\n");
@@ -524,7 +524,7 @@ optionsstatement:
}
}
|
- STRING QUOTEDSTRING SEMICOLON
+ STRING QUOTEDSTRING SEMICOLON CRLF
{
if (strcasecmp($1, "interface") == 0) {
iflag = 1;
@@ -539,7 +539,7 @@ optionsstatement:
}
|
- STRING NUMBER SEMICOLON
+ STRING NUMBER SEMICOLON CRLF
{
if (strcasecmp($1, "fork") == 0) {
dolog(LOG_DEBUG, "forking %d times\n", $2);
@@ -551,7 +551,7 @@ optionsstatement:
}
|
- STRING ipcidr SEMICOLON
+ STRING ipcidr SEMICOLON CRLF
{
if (strcasecmp($1, "bind") == 0) {
bflag = 1;
@@ -564,7 +564,7 @@ optionsstatement:
}
}
- | comment
+ | comment CRLF
;
/* logging below */
@@ -1195,7 +1195,7 @@ yylex()
if (*cp != '\0' || (buf[0] == '.' && buf[1] == '\0')) {
#ifdef LEXDEBUG
- printf("returning %s\n", "STRING");
+ printf("returning %s (%s)\n", "STRING", buf);
#endif
return (STRING);
}
repomaster@centroid.eu