I'm going to withdraw my objection in regards to wanting to send out a
cumulus version of the patch.  The patch we have depends on patches which
in turn depend on other patches.  I'm not going to attempt to unwind them
now due to some other obligations.

The one thing that Semyon's patch does not address is the various show
commands that will display output now when they should not.

If anyone is interested:

https://github.com/CumulusNetworks/quagga/commit/0bad48516f4caf5223cbfabcbdecf94bb70ffc8e

donald

On Mon, Sep 21, 2015 at 12:13 PM, Donald Sharp <sha...@cumulusnetworks.com>
wrote:

> Semyon -
>
> This patch is a good start to the issue at hand, but it does not resolve
> all the various ospf show commands.  As Vipin stated we have a patch that
> addresses this.  Let me spin it forward here in a few minutes.
>
> donald
>
> On Mon, Sep 21, 2015 at 8:02 AM, Semyon Verchenko <semverche...@gmail.com>
> wrote:
>
>> fix https://lists.quagga.net/pipermail/quagga-dev/2015-April/012195.html
>> issue -- "router ospf" appearance in vtysh running-config while it is not
>> present in ospfd's config
>> ---
>>  ospfd/ospf_vty.c |  4 +++-
>>  ospfd/ospfd.c    | 11 +++++++++++
>>  ospfd/ospfd.h    |  2 ++
>>  3 files changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
>> index 9d04892..71dd41d 100644
>> --- a/ospfd/ospf_vty.c
>> +++ b/ospfd/ospf_vty.c
>> @@ -150,7 +150,7 @@ DEFUN (router_ospf,
>>         "Start OSPF configuration\n")
>>  {
>>    vty->node = OSPF_NODE;
>> -  vty->index = ospf_get ();
>> +  vty->index = ospf_route ();
>>
>>    return CMD_SUCCESS;
>>  }
>> @@ -7249,6 +7249,8 @@ ospf_config_write (struct vty *vty)
>>    ospf = ospf_lookup ();
>>    if (ospf != NULL)
>>      {
>> +                       if (!ospf->is_routed)
>> +                               return write;
>>        /* `router ospf' print. */
>>        vty_out (vty, "router ospf%s", VTY_NEWLINE);
>>
>> diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
>> index 019a22b..48770ac 100644
>> --- a/ospfd/ospfd.c
>> +++ b/ospfd/ospfd.c
>> @@ -169,6 +169,8 @@ ospf_new (void)
>>    new->router_id.s_addr = htonl (0);
>>    new->router_id_static.s_addr = htonl (0);
>>
>> +       new->is_routed = 0;
>> +
>>    new->abr_type = OSPF_ABR_DEFAULT;
>>    new->oiflist = list_new ();
>>    new->vlinks = list_new ();
>> @@ -287,6 +289,15 @@ ospf_get ()
>>    return ospf;
>>  }
>>
>> +struct ospf *
>> +ospf_route ()
>> +{
>> +       struct ospf * ospf;
>> +       ospf = ospf_get ();
>> +       ospf->is_routed = 1;
>> +       return ospf;
>> +}
>> +
>>  /* Handle the second half of deferred shutdown. This is called either
>>   * from the deferred-shutdown timer thread, or directly through
>>   * ospf_deferred_shutdown_check.
>> diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
>> index 06841b8..1d6181b 100644
>> --- a/ospfd/ospfd.h
>> +++ b/ospfd/ospfd.h
>> @@ -107,6 +107,7 @@ struct ospf
>>    struct in_addr router_id;            /* Configured automatically. */
>>    struct in_addr router_id_static;     /* Configured manually. */
>>
>> +       u_char is_routed;  /* True if there was route ospf command */
>>    /* ABR/ASBR internal flags. */
>>    u_char flags;
>>  #define OSPF_FLAG_ABR           0x0001
>> @@ -508,6 +509,7 @@ extern int ospf_zlog;
>>  extern const char *ospf_redist_string(u_int route_type);
>>  extern struct ospf *ospf_lookup (void);
>>  extern struct ospf *ospf_get (void);
>> +extern struct ospf *ospf_route (void);
>>  extern void ospf_finish (struct ospf *);
>>  extern void ospf_router_id_update (struct ospf *ospf);
>>  extern int ospf_network_set (struct ospf *, struct prefix_ipv4 *,
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> Quagga-dev mailing list
>> Quagga-dev@lists.quagga.net
>> https://lists.quagga.net/mailman/listinfo/quagga-dev
>>
>
>
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to