diff options
author | Arturo Borrero Gonzalez <arturo@netfilter.org> | 2021-01-20 14:04:14 +0100 |
---|---|---|
committer | Arturo Borrero Gonzalez <arturo@netfilter.org> | 2021-02-01 11:29:25 +0100 |
commit | 089aa91d6a4a382775d6077c842492ed3d54be60 (patch) | |
tree | 6f17597503e73830eab768e08547a39ed4697f47 /src/read_config_lex.l | |
parent | 3132697b9a0f6ce9574f52e56b0f2a13624e5aa7 (diff) |
conntrackd: introduce yes & no config values
They are equivalent of 'on' and 'off' and makes the config easier to understand.
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Diffstat (limited to 'src/read_config_lex.l')
-rw-r--r-- | src/read_config_lex.l | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/read_config_lex.l b/src/read_config_lex.l index b0d9e61..f1f4fe3 100644 --- a/src/read_config_lex.l +++ b/src/read_config_lex.l @@ -35,6 +35,10 @@ nl [\n\r] is_on [o|O][n|N] is_off [o|O][f|F][f|F] +is_yes [y|Y][e|E][s|S] +is_no [n|N][o|O] +is_true {is_on}|{is_yes} +is_false {is_off}|{is_no} integer [0-9]+ signed_integer [\-\+][0-9]+ path \/[^\"\n ]* @@ -138,8 +142,8 @@ notrack [N|n][O|o][T|t][R|r][A|a][C|c][K|k] "Systemd" { return T_SYSTEMD; } "StartupResync" { return T_STARTUP_RESYNC; } -{is_on} { return T_ON; } -{is_off} { return T_OFF; } +{is_true} { return T_ON; } +{is_false} { return T_OFF; } {integer} { yylval.val = atoi(yytext); return T_NUMBER; } {signed_integer} { yylval.val = atoi(yytext); return T_SIGNED_NUMBER; } {ip4} { yylval.string = strdup(yytext); return T_IP; } |