X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=34d571f08c481282266ed8e9019d1c47dde13ccc;hb=c69af19fe8f20b5a3333e54310b1592bc3f6dfd0;hp=2c7ae9e43ec564367c60beaacabd0062fff29b28;hpb=7634353824f1631c3008dc43a4a1cc0aebff3caa;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 2c7ae9e4..34d571f0 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -37,8 +37,6 @@ #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. @@ -210,10 +208,10 @@ netflow_set_options(struct netflow *nf, 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) {