#define NETFLOW_V5_VERSION 5
-static const int ACTIVE_TIMEOUT_DEFAULT = 600;
-
/* Every NetFlow v5 message contains the header that follows. This is
* followed by up to thirty records that describe a terminating flow.
* We only send a single record per NetFlow message.
collectors_create(&nf_options->collectors, 0, &nf->collectors);
old_timeout = nf->active_timeout;
- if (nf_options->active_timeout > 0) {
+ if (nf_options->active_timeout >= 0) {
nf->active_timeout = nf_options->active_timeout;
} else {
- nf->active_timeout = ACTIVE_TIMEOUT_DEFAULT;
+ nf->active_timeout = NF_ACTIVE_TIMEOUT_DEFAULT;
}
nf->active_timeout *= 1000;
if (old_timeout != nf->active_timeout) {
if (!opts.active_timeout) {
opts.active_timeout = -1;
} else if (opts.active_timeout < 0) {
- opts.active_timeout = 0;
+ VLOG_WARN("bridge %s: active timeout interval set to negative "
+ "value, using default instead (%d seconds)", br->name,
+ NF_ACTIVE_TIMEOUT_DEFAULT);
+ opts.active_timeout = -1;
}
opts.add_id_to_iface = nf_cfg->add_id_to_interface;