One comment:

On Wed, Nov 25, 2015 at 12:14 PM, Paul Jakma <paul.ja...@hpe.com> wrote:

>
> @@ -552,32 +543,32 @@ bgp_info_cmp (struct bgp *bgp, struct bgp_info *new,
> struct bgp_info *exist,
>      exist_cluster = existattre->cluster->length;
>
>    if (new_cluster < exist_cluster)
> -    return 1;
> +    return -1;
>    if (new_cluster > exist_cluster)
> -    return 0;
> +    return 1;
>
>    /* 13. Neighbor address comparision. */
>    /* Do this only if neither path is "stale" as stale paths do not have
>     * valid peer information (as the connection may or may not be up).
>     */
>    if (CHECK_FLAG (exist->flags, BGP_INFO_STALE))
> -    return 1;
> +    return -1;
>    if (CHECK_FLAG (new->flags, BGP_INFO_STALE))
> -    return 0;
> +    return 1;
>    /* locally configured routes to advertise do not have su_remote */
>    if (new->peer->su_remote == NULL)
> -    return 0;
> -  if (exist->peer->su_remote == NULL)
>      return 1;
> +  if (exist->peer->su_remote == NULL)
> +    return -1;
>
>    ret = sockunion_cmp (new->peer->su_remote, exist->peer->su_remote);
> -
> +
>    if (ret == 1)
> -    return 0;
> -  if (ret == -1)
>      return 1;
> +  if (ret == -1)
> +    return -1;
>
> -  return 1;
> +  return -1;
>  }
>
>

Shouldn't this return -1 be a return 0?

We are at the end of the comparisons and there was no resolution therefore
they are equal?

donald
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to