diff options
author | Dinesh G Dutt <ddutt@cumulusnetworks.com> | 2016-07-20 17:24:47 +0200 |
---|---|---|
committer | Dinesh G Dutt <ddutt@cumulusnetworks.com> | 2016-07-20 18:14:27 +0200 |
commit | 6ac9179ca77086c96a3c0a5de03420ec8b830db3 (patch) | |
tree | 64ef055cad90fb0ab8c99b15d4029e47f55f5b2c | |
parent | bgpd: Print the correct table in "show ip bgp x.x.x.x" (diff) | |
download | frr-6ac9179ca77086c96a3c0a5de03420ec8b830db3.tar.xz frr-6ac9179ca77086c96a3c0a5de03420ec8b830db3.zip |
Make vtysh-integrated-config truly the default and fix quagga reload for this.
Ticket: CM-11910
Reviewed By: sharpd, routing-dev slack
Testing Done: Test with nothing in vtysh.conf, add no, remove it etc.
Even though we force integrated config to be the default, we do this by adding
a line to our default vtysh.conf which has integrated config enabled. When we
stopped printing integrated-config as part of wr mem or show running-config, we
broke quagga reload because it was explicitly looking for integrated config.
Furthermore, merely fixing quagga reload wouldn't work because subsequent saves
would result in config being saved to individual files since vtysh.conf no
longer forced the file to be integrated.
This patch fixes both issues. Makes integrated config the default in the code,
rather than via a shipped default file, and fixes quagga reload to look for
the "no integrated-vtysh-config" to deny attempting a reload.
-rwxr-xr-x | tools/quagga-reload.py | 6 | ||||
-rw-r--r-- | vtysh/vtysh.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/quagga-reload.py b/tools/quagga-reload.py index 22d44b336..f90b3e95f 100755 --- a/tools/quagga-reload.py +++ b/tools/quagga-reload.py @@ -708,15 +708,15 @@ if __name__ == '__main__': # Verify that 'service integrated-vtysh-config' is configured vtysh_filename = '/etc/quagga/vtysh.conf' - service_integrated_vtysh_config = False + service_integrated_vtysh_config = True if os.path.isfile(vtysh_filename): with open(vtysh_filename, 'r') as fh: for line in fh.readlines(): line = line.strip() - if line == 'service integrated-vtysh-config': - service_integrated_vtysh_config = True + if line == 'no service integrated-vtysh-config': + service_integrated_vtysh_config = False break if not service_integrated_vtysh_config: diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index abd5d04f4..ad43f41fd 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -71,7 +71,7 @@ struct vtysh_client vtysh_client[] = }; /* Using integrated config from Quagga.conf. Default is no. */ -int vtysh_writeconfig_integrated = 0; +int vtysh_writeconfig_integrated = 1; extern char config_default[]; |