[quagga-dev 12853] Re: [PATCH] isisd: Fix overload-bit

Donald Sharp sharpd at cumulusnetworks.com
Fri Jul 3 04:07:54 BST 2015


I don't believe this patch is correct:

!
router isis GREEN
 metric-style wide
 set-overload-bit
!
router isis BLUE
 metric-style wide
 is-type level-1
 spf-interval 5
!

If I am reading your code right, set-overload-bit will cause the overload
bit to be set for both GREEN and BLUE.  The correct fix is to figure out
what is going wrong in the router_isis_cmd and isis_area_get()
functionality.

donald

On Thu, Jul 2, 2015 at 10:51 PM, Nambiar, Amritha <amritha.nambiar at intel.com
> wrote:

> I believe so, although I have only tested the overload-bit command among
> them.
>
> Thanks,
> Amritha
>
> From: Donald Sharp [mailto:sharpd at cumulusnetworks.com]
> Sent: Thursday, July 2, 2015 7:33 PM
> To: Nambiar, Amritha
> Cc: quagga-dev at lists.quagga.net
> Subject: Re: [quagga-dev 12849] [PATCH] isisd: Fix overload-bit
>
> I see lots of commands in isisd.c that have 'area = vty->index'.  Does
> this patch imply that they are all broken as well?
>
> doanld
>
> On Thu, Jul 2, 2015 at 10:16 PM, Amritha Nambiar <
> amritha.nambiar at intel.com> wrote:
> isisd.c :
> set/reset overload-bit using "set-overload-bit" or "no set-overload-bit"
> commands fails to set the bit in LSP header. This is because
> area = vty->index does not find a valid area.
>
> Signed-off-by: Amritha Nambiar <amritha.nambiar at intel.com>
> ---
>  isisd/isisd.c |   23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/isisd/isisd.c b/isisd/isisd.c
> index 9c9b918..287ef81 100644
> --- a/isisd/isisd.c
> +++ b/isisd/isisd.c
> @@ -2143,12 +2143,13 @@ DEFUN (set_overload_bit,
>         "Set overload bit\n")
>  {
>    struct isis_area *area;
> +  struct listnode *anode;
>
> -  area = vty->index;
> -  assert (area);
> -
> -  area->overload_bit = LSPBIT_OL;
> -  lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
> +  for (ALL_LIST_ELEMENTS_RO (isis->area_list, anode, area))
> +    {
> +      area->overload_bit = LSPBIT_OL;
> +      lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
> +    }
>
>    return CMD_SUCCESS;
>  }
> @@ -2160,13 +2161,13 @@ DEFUN (no_set_overload_bit,
>         "Reset overload bit\n")
>  {
>    struct isis_area *area;
> +  struct listnode *anode;
>
> -  area = vty->index;
> -  assert (area);
> -
> -  area->overload_bit = 0;
> -  lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
> -
> +  for (ALL_LIST_ELEMENTS_RO (isis->area_list, anode, area))
> +    {
> +      area->overload_bit = 0;
> +      lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
> +    }
>    return CMD_SUCCESS;
>  }
>
>
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20150702/1c1fa2b7/attachment-0001.html>


More information about the Quagga-dev mailing list