summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9f0100c)
If the set of collectors for NetFlow or sFlow is empty due to
an error it will cause a crash when trying to send data.
Reported-by: Tetsuo NAKAGAWA <nakagawa@mxc.nes.nec.co.jp>
void
collectors_send(const struct collectors *c, const void *payload, size_t n)
{
void
collectors_send(const struct collectors *c, const void *payload, size_t n)
{
- for (i = 0; i < c->n_fds; i++) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
- if (send(c->fds[i], payload, n, 0) == -1) {
- VLOG_WARN_RL(&rl, "sending to collector failed: %s",
- strerror(errno));
+ for (i = 0; i < c->n_fds; i++) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+ if (send(c->fds[i], payload, n, 0) == -1) {
+ VLOG_WARN_RL(&rl, "sending to collector failed: %s",
+ strerror(errno));
+ }