On 25. Juli 2014 00:01:01 GMT+01:00, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: >+ | LEVEL STRING >+ { >+ if (strcmp($2, "emerg") == 0) { >+ $<stmt>0->log.level = LOG_EMERG; >+ } else if (strcmp($2, "alert") == 0) { >+ $<stmt>0->log.level = LOG_ALERT; >+ } else if (strcmp($2, "crit") == 0) { >+ $<stmt>0->log.level = LOG_CRIT; >+ } else if (strcmp($2, "err") == 0) { >+ $<stmt>0->log.level = LOG_ERR; >+ } else if (strcmp($2, "warn") == 0) { >+ $<stmt>0->log.level = LOG_WARNING; >+ } else if (strcmp($2, "notice") == 0) { >+ $<stmt>0->log.level = LOG_NOTICE; >+ } else if (strcmp($2, "info") == 0) { >+ $<stmt>0->log.level = LOG_INFO; >+ } else if (strcmp($2, "debug") == 0) { >+ $<stmt>0->log.level = LOG_DEBUG; >+ } else { >+ erec_queue(error(&@2, >+ "invalid syslog level %s", >+ $2), state->msgs); >+ YYERROR; Any reason for not using the parser for the log levels? -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html