X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=34d571f08c481282266ed8e9019d1c47dde13ccc;hb=3a32d4ca77ab91c495b3628b58c3967af7b6ff39;hp=7c77c64ff2ff0019a9ac5766e77defc2bdce681b;hpb=6bab37989b1b5e8981bee80e1fedef621799332c;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 7c77c64f..34d571f0 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -20,7 +20,6 @@ #include #include #include -#include "cfg.h" #include "collectors.h" #include "flow.h" #include "netflow.h" @@ -38,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. @@ -211,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 != -1) { + 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) {