[quagga-dev 8166] Re: [PATCH] Zebra zserv: bogus conditional

Balaji G balajig81 at gmail.com
Fri Aug 20 15:27:09 BST 2010


Applied, Thanks.

Surprised it was working fine these days :)

Cheers,
  - Balaji

On Thu, Aug 19, 2010 at 4:26 AM, Stephen Hemminger <shemminger at vyatta.com>wrote:

> This looks like a bug in original code from misunderstanding
> of C rules of evaluation.
>
> ---
>  zebra/zserv.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/zebra/zserv.c b/zebra/zserv.c
> index 8e1df52..64a6c06 100644
> --- a/zebra/zserv.c
> +++ b/zebra/zserv.c
> @@ -451,7 +451,7 @@ zsend_route_multipath (int cmd, struct zserv *client,
> struct prefix *p,
>     }
>
>   /* Metric */
> -  if (cmd == ZEBRA_IPV4_ROUTE_ADD || ZEBRA_IPV6_ROUTE_ADD)
> +  if (cmd == ZEBRA_IPV4_ROUTE_ADD || cmd == ZEBRA_IPV6_ROUTE_ADD)
>     {
>       SET_FLAG (zapi_flags, ZAPI_MESSAGE_DISTANCE);
>       stream_putc (s, rib->distance);
> --
> 1.7.0.4
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> http://lists.quagga.net/mailman/listinfo/quagga-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20100820/411b0c24/attachment-0001.html>


More information about the Quagga-dev mailing list