diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-05 14:13:11 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-05 14:13:11 +0000 |
commit | 7763eff37cd8ab4b1af0021c18f1ff86e1f19acd (patch) | |
tree | 2f9e7d0c22933a3eec15723c24c19da9cc3099e5 /src/read_config_yy.y | |
parent | 70d1f229a46565c48cfaa6412e865ddd4bc5c585 (diff) | |
download | conntrack-tools-7763eff37cd8ab4b1af0021c18f1ff86e1f19acd.tar.gz conntrack-tools-7763eff37cd8ab4b1af0021c18f1ff86e1f19acd.zip |
obsolete `-S' option: Use information provided by the config file
Diffstat (limited to 'src/read_config_yy.y')
-rw-r--r-- | src/read_config_yy.y | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/read_config_yy.y b/src/read_config_yy.y index ebb1c73..e2bb4c8 100644 --- a/src/read_config_yy.y +++ b/src/read_config_yy.y @@ -356,7 +356,15 @@ ignore_proto: T_IGMP conf.ignore_protocol[IPPROTO_IGMP] = 1; }; -sync: T_SYNC '{' sync_list '}'; +sync: T_SYNC '{' sync_list '}' +{ + if (conf.flags & CTD_STATS_MODE) { + fprintf(stderr, "ERROR: Cannot use both Stats and Sync " + "clauses in conntrackd.conf.\n"); + exit(EXIT_FAILURE); + } + conf.flags |= CTD_SYNC_MODE; +}; sync_list: | sync_list sync_line; @@ -377,12 +385,12 @@ sync_line: refreshtime sync_mode_alarm: T_SYNC_MODE T_ALARM '{' sync_mode_alarm_list '}' { - conf.flags |= SYNC_MODE_ALARM; + conf.flags |= CTD_SYNC_ALARM; }; sync_mode_ftfw: T_SYNC_MODE T_FTFW '{' sync_mode_ftfw_list '}' { - conf.flags |= SYNC_MODE_FTFW; + conf.flags |= CTD_SYNC_FTFW; }; sync_mode_alarm_list: @@ -554,7 +562,15 @@ family : T_FAMILY T_STRING conf.family = AF_INET; }; -stats: T_STATS '{' stats_list '}'; +stats: T_STATS '{' stats_list '}' +{ + if (conf.flags & CTD_SYNC_MODE) { + fprintf(stderr, "ERROR: Cannot use both Stats and Sync " + "clauses in conntrackd.conf.\n"); + exit(EXIT_FAILURE); + } + conf.flags |= CTD_STATS_MODE; +}; stats_list: | stats_list stat_line |