git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure "service vswitch status" returns appropriate error code
[sliver-openvswitch.git]
/
ofproto
/
netflow.c
diff --git
a/ofproto/netflow.c
b/ofproto/netflow.c
index
e867c0e
..
7912b4b
100644
(file)
--- a/
ofproto/netflow.c
+++ b/
ofproto/netflow.c
@@
-107,7
+107,7
@@
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
static int
open_collector(char *dst)
{
static int
open_collector(char *dst)
{
- char *save_ptr;
+ char *save_ptr
= NULL
;
const char *host_name;
const char *port_string;
struct sockaddr_in sin;
const char *host_name;
const char *port_string;
struct sockaddr_in sin;
@@
-197,7
+197,6
@@
netflow_expire(struct netflow *nf, const struct ofexpired *expired)
uint16_t iface = (nf->engine_id & 0x7f) << 9;
nf_rec->input = htons(iface | (expired->flow.in_port & 0x1ff));
nf_rec->output = htons(iface);
uint16_t iface = (nf->engine_id & 0x7f) << 9;
nf_rec->input = htons(iface | (expired->flow.in_port & 0x1ff));
nf_rec->output = htons(iface);
- printf("input: %x\n", ntohs(nf_rec->input));
} else {
nf_rec->input = htons(expired->flow.in_port);
nf_rec->output = htons(0);
} else {
nf_rec->input = htons(expired->flow.in_port);
nf_rec->output = htons(0);
@@
-222,9
+221,8
@@
netflow_expire(struct netflow *nf, const struct ofexpired *expired)
nf_rec->ip_proto = expired->flow.nw_proto;
nf_rec->ip_tos = expired->ip_tos;
nf_rec->ip_proto = expired->flow.nw_proto;
nf_rec->ip_tos = expired->ip_tos;
- /* NetFlow messages are limited to 30 records. A length of 1400
- * bytes guarantees that the limit is not exceeded. */
- if (nf->packet.size >= 1400) {
+ /* NetFlow messages are limited to 30 records. */
+ if (ntohs(nf_hdr->count) >= 30) {
netflow_run(nf);
}
}
netflow_run(nf);
}
}