[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvswitch-dev
Subject:    [ovs-dev] openflow-1.0 : ovs-vswitchd received SIGSEGV when netflow was specified
From:       nakagawa () mxc ! nes ! nec ! co ! jp (Tetsuo NAKAGAWA)
Date:       2010-02-26 0:45:34
Message-ID: 20100226.094534.99450953.nakagawa () mxc ! nes ! nec ! co ! jp
[Download RAW message or body]

Hi, Jesse.

Thank you very much for corresponding to my bug report
quickly.

I think it's no-problem by following policy.

best regards,

--- Tetsuo NAKAGAWA

> Thanks for pointing this out.  However, I think that it would be better to
> do the check in the collectors library since it is shared with sFlow, which
> could have the same problem.  I pushed the following patch to the 'next'
> branch (which openflow-1.0 was merged into):
> 
> commit 7e56c85c02c547deda93ec09a589eae7e253fc58
> Author: Jesse Gross <jesse at nicira.com>
> Date:   Thu Feb 25 09:02:26 2010 -0500
> 
>     collectors: Check for NULL set of collectors.
> 
>     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 at mxc.nes.nec.co.jp>
> 
> diff --git a/ofproto/collectors.c b/ofproto/collectors.c
> index 4589f32..f063983 100644
> --- a/ofproto/collectors.c
> +++ b/ofproto/collectors.c
> @@ -111,13 +111,15 @@ collectors_destroy(struct collectors *c)
>  void
>  collectors_send(const struct collectors *c, const void *payload, size_t n)
>  {
> -    size_t i;
> +    if (c) {
> +        size_t i;
> 
> -    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));
> +            }
>          }
>      }
>  }
> @@ -125,5 +127,5 @@ collectors_send(const struct collectors *c, const void
> *payl
>  int
>  collectors_count(const struct collectors *c)
>  {
> -    return c->n_fds;
> +    return c ? c->n_fds : 0;
>  }




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic