[quagga-dev 12143] Quagga configuration files and interaction with service integrated-vtysh-config

Donald Sharp sharpd at cumulusnetworks.com
Wed Apr 15 15:34:00 BST 2015

Currently when you do:

service integrated-vtysh-config

<restart all of quagga somewhere along the way>

dell-s6000-02# conf t
dell-s6000-02(config)# no service integrated-vtysh-config
dell-s6000-02(config)# end
dell-s6000-02# wr mem
Building Configuration...
Can't save to configuration file, using vtysh.
Can't save to configuration file, using vtysh.

The second write fails because of vty.c vty_read_config(L2396) on
initialization it checks to see:

      if ( strstr(config_default_dir, "vtysh") == NULL)


          ret = stat (integrate_default, &conf_stat);

          if (ret >= 0)



Which causes the line a bit further down(L2431):

host_config_set (fullpath);

to never be executed, because the Quagga.conf file still exists.  Thus
host.config for each daemon is never set and we cannot write to the
appropriate config file after a 'no service inte..'

Suggested fix:

in vty_read_config *always* call host_config_set, and in
vtysh_write_memory_cmd add an else statement for(vtysh.c, L1899):

  /* If integrated Quagga.conf explicitely set. */

  if (vtysh_writeconfig_integrated)

    return write_config_integrated();


    write_config_integrated_delete();  // Probably just rename the file to
a backup file name


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20150415/83eee5f5/attachment-0001.html>

More information about the Quagga-dev mailing list