X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=34d571f08c481282266ed8e9019d1c47dde13ccc;hb=c69af19fe8f20b5a3333e54310b1592bc3f6dfd0;hp=b016663867419db61caa8a7ec144f14c6ad6e8e9;hpb=96d2ee8e314fb95a0066db50c5af585aef1700c3;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index b0166638..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) {