summaryrefslogtreecommitdiffstats
path: root/vtysh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vtysh: Don't attempt to reconnect the non-instanced ospf processDonald Sharp2018-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When running ospf instances we should not attempt to reconnect the default ospf instance on running a command. This commit should be targeted enough because in the case of normal operation we connect to everything we should and only set the VTYSH_WAS_ACTIVE flag for those we truly have lost connection too. Before: donna.cumulusnetworks.com# config t donna.cumulusnetworks.com(config)# router ospf 100 Warning: connecting to ospfd...failed! donna.cumulusnetworks.com(config-router)# After: donna.cumulusnetworks.com# conf t donna.cumulusnetworks.com(config)# router ospf 100 donna.cumulusnetworks.com(config-router)# end donna.cumulusnetworks.com# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #3202 from donaldsharp/evpn_dumpRuss White2018-11-091-1/+1
|\ | | | | Evpn dump
| * bgpd, lib, vtysh, zebra: Convert to using CMD_VNI_RANGEDonald Sharp2018-10-311-1/+1
| | | | | | | | | | | | For the vni range use a macro to keep track of it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib: introduce new northbound APIRenato Westphal2018-10-271-1/+5
|/ | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3235 from opensourcerouting/buildfoo-20181024Lou Berger2018-10-271-2/+0
|\ | | | | build: potpourri
| * build: make clean and dist consistentDavid Lamparter2018-10-241-2/+0
| | | | | | | | | | | | | | We weren't cleaning up some files (a whole lot of python foobar) and had some files in the dist tarball that don't quite belong there. Signed-off-by: David Lamparter <equinox@diac24.net>
* | Merge pull request #3199 from donaldsharp/eigrp_keyDavid Lamparter2018-10-263-3/+4
|\ \ | | | | | | Eigrp cli stuff
| * | vtysh: Allow eigrp and rip access to keychain.c configDonald Sharp2018-10-253-3/+4
| |/ | | | | | | | | | | | | The key-chain code was specific to rip and as such was not being delivered to eigrp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* / vtysh: fix exit-vrf printingQuentin Young2018-10-241-12/+76
|/ | | | | | | | Resolves issue with exit-vrf being placed at the end of zebra's portion of a vrf block, but before other daemons' portions of the same config block. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #3175 from donaldsharp/show_run_staticDavid Lamparter2018-10-231-6/+10
|\ | | | | vtysh: Add some missing daemons to some commands in vtysh
| * vtysh: Add some missing daemons to some commands in vtyshDonald Sharp2018-10-151-6/+10
| | | | | | | | | | Fixes: #3173 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #3203 from opensourcerouting/buildfoo-20181015Donald Sharp2018-10-191-1/+1
|\ \ | | | | | | Debian packaging & generic build stuff
| * | build: rewrite readline/curses checkDavid Lamparter2018-10-191-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | We don't need termcap/tinfo/curses, those are just for libreadline. On most modern systems, libreadline will pull in the appropriate libs it needs on its own, so unconditionally adding them adds an extra unneeded dependency for us. Still need to try with curses/... for some systems, but only after bare readline fails. Signed-off-by: David Lamparter <equinox@diac24.net>
* / lib, vtysh: Allow notification across multiple lines of failureDonald Sharp2018-10-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | When reading in config files and we have failures on multiple lines actually note the actual failure lines and return them. This fixes an issue where we stopped counting errors after the first one and we got missleading line numbers that did not correspond to the actual problem. This is fixed: sharpd@donna ~/frr> sudo /usr/lib/frr/pimd --log=stdout -A 127.0.0.1 -f /etc/frr/pimd.conf 2018/10/11 09:41:01 PIM: VRF Created: default(0) 2018/10/11 09:41:01 PIM: pim_vrf_enable: for default 2018/10/11 09:41:01 PIM: zclient_lookup_sched_now: zclient lookup immediate connection scheduled 2018/10/11 09:41:01 PIM: zclient_lookup_new: zclient lookup socket initialized 2018/10/11 09:41:01 PIM: pimd 6.1-dev starting: vty@2611 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 2: inteface lo 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 3: ip igmp 2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 4: ip igmp join 224.1.1.1 13.13.13.2 ^C2018/10/11 09:45:09 PIM: Terminating on signal SIGINT 2018/10/11 09:45:09 PIM: VRF Deletion: default(0) Fixes: #3161 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: remove ip prefix from as-path, <large,ext>community-listSarita Patra2018-10-051-8/+8
| | | | | | | | | | The existing commands "ip as-path", "ip community list", "ip extcommunity list" & "ip largecommunity list" is used to configure both for ipv4 and ipv6. So the prefix "ip" is removed from these commands. All the configuration, show related configuration, show running config & boot up with write memory is also verified with the provided fix. Signed-off-by: Sarita Patra <saritap@vmware.com>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-2/+2
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* lib vtysh zebra: variable shadowing fixesF. Aragon2018-09-121-2/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* vtysh: make RPKI node non-conditionalDavid Lamparter2018-09-081-11/+0
| | | | | | | | | | Whether or not RPKI is enabled during build shouldn't really influence vtysh; the user can always manually install bgpd_rpki.so later and it should work. This also means that the behaviour of "RPKI module not loaded" is consistent regardless of whether it was a compile-time or runtime decision. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-13/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-148/+3
| | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: non-recursive vtyshDavid Lamparter2018-09-084-23/+44
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: non-recursive bgpd & rfpDavid Lamparter2018-09-081-16/+7
| | | | | | | | Note: no more --with-rfp-path on configure - badly messing with the build system like this really isn't how to do a conditional external dependency. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #2875 from opensourcerouting/fabricdDonald Sharp2018-09-085-13/+85
|\ | | | | OpenFabric support
| * isis: Cleanup CLI, split into parts which are shared, fabricd and isisdChristian Franke2018-09-052-3/+16
| | | | | | | | | | | | | | | | Remove isis_vty.c and create three new files isis_vty_common.c, isis_vty_fabricd.c and isis_vty_isisd.c which are built into both daemons, only fabricd and only isisd, respectively. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * vtysh: support fabricdChristian Franke2018-09-054-12/+71
| | | | | | | | | | | | | | | | | | Extend extract.pl so it can deal with the isis source code being compiled twice, once for isisd and once for fabricd. Add the fabricd node and client to vtysh. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | vtysh: Actually make the new_completion function matchDonald Sharp2018-09-081-3/+2
| | | | | | | | | | | | | | | | | | The new_completion function was not declared the same way the rl_attempted_completion_function pointer was. The only difference was a 'const char *' -vs- 'char *' So convert it over. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | vtysh: Add code to isolate append_historyDonald Sharp2018-09-081-0/+10
|/ | | | | | | | | The append_history function in lib readline appears to not be universally available across all of the esoteric platforms we may want to compile on. As such provide a way to gracefully do nothing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* vtysh: Let staticd know about vrf sub-modeDonald Sharp2018-08-311-1/+1
| | | | | | staticd was not transitioning into vrf sub-mode, this fixes it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: fix rpki exit commandQuentin Young2018-08-231-18/+17
| | | | | | | | If a command returns a nonzero exit status and VTYSH has a corresponding command, VTYSH will skip executing its own version. If this happens in a command that changes CLI nodes we get node desynchronization. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib, vtysh: fixup style nits for error refsQuentin Young2018-08-141-1/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add 'show error all json'Quentin Young2018-08-141-5/+12
| | | | | | | * Add 'all' option * Add 'json' option Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add error reference systemQuentin Young2018-08-141-0/+16
| | | | | | | | * Add zlog_* function to log with a reference code * Add ability to track reference cards for errors to ferr.[ch] * Assign some reference code ranges Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge branch 'master' into bfd-finalDonald Sharp2018-08-144-37/+19
|\
| * Merge pull request #2823 from opensourcerouting/snap-staticdDonald Sharp2018-08-141-1/+1
| |\ | | | | | | Updates to snap package to support staticd
| | * vtysh: Fix missing tailing / in --config_dir option parsingMartin Winter2018-08-131-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
| * | lib, vtysh: fix inconsistent interface commands in vtyshRenato Westphal2018-08-133-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definition of the interface commands in vtysh.c were outdated. Currently, all daemons that call if_cmd_init() will have the "no interface IFNAME" command and the "[no] description" commands as well, so there's no need to define exceptions for these commands anymore. To fix this, make extract.pl parse the if.c file so that vtysh can get the interface commands from there automatically. Only the "interface IFNAME [vrf NAME]" must be kept in vtysh.c because it changes the vty node and thus needs special treatment. Finally, make pimd and pbrd display interface descriptions on "sh run" when they are configured. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | lib, vtysh: fix inconsistent VRF commands in vtyshRenato Westphal2018-08-132-6/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | * Only zebra and pimd call vrf_cmd_init(), so these are the only daemons that should receive VRF commands from vtysh; * "netns NAME" and "no netns NAME" are available only in zebra, write custom DEFSHs in vtysh to make it aware of that; * Remove the "no vrf NAME" definition from vtysh.c and expose the original command to vtysh by converting the DEFUN_NOSH to a simple DEFUN. This command doesn't change the vty node so there's no need to special case it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* / bfdd: add vty shell commandsRafael Zalamena2018-08-084-17/+97
|/ | | | | | | Implement vty shell integration and allow `bfdd` to be configured through FRR's vtysh. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* Merge pull request #2122 from donaldsharp/zebra_nhsMartin Winter2018-08-083-1/+7
|\ | | | | Create Staticd
| * staticd: Start the addition of a staticdDonald Sharp2018-07-293-1/+7
| | | | | | | | | | | | | | | | | | This is the start of separating out the static handling code from zebra -> staticd. This will help simplify the zebra code and isolate static route handling to it's own code base. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | vtysh: Respect order dependancy of some pim commandsDonald Sharp2018-08-021-0/+3
|/ | | | | | | | If `ip igmp query-max-respone-time ` is specified allow it to show up before `ip igmp query-interval ` since there are order dependancies that may show up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
* vtysh: fix autocomplete garbage printoutsQuentin Young2018-06-281-0/+3
| | | | | | | | The semantics for suppressing output received from daemons changed slightly when pipe actions were introduced, causing raw autocomplete output to be printed where it shouldn't have been. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: remove deprecated 'log trap' commandsQuentin Young2018-06-251-20/+0
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #2512 from ↵Quentin Young2018-06-221-2/+7
|\ | | | | | | | | pacovn/Coverity_1399200_Unchecked_return_value_from_library vtysh: return value check (Coverity 1399200)
| * vtysh: return value check (Coverity 1399200)paco2018-06-221-2/+7
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | vtysh: Fix 'no log syslog ..' to be correctDonald Sharp2018-06-191-2/+3
|/ | | | | | | The vtysh version of `no log syslog...` was out of sync with what is actually correct. Fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #2474 from donaldsharp/vty_thread_cancel_writesRuss White2018-06-191-0/+23
|\ | | | | Add 'show thread poll'
| * lib: A small optimization for the hash iterate and walk functionsDonald Sharp2018-06-171-1/+0
| | | | | | | | | | | | | | | | | | When we are iterating through the hash, keep count of how many we've called and if we have finished calling the hash->size iterator times, then short-circuit and stop looping over the entire array. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * lib, vtysh: Add 'show thread poll' commandDonald Sharp2018-06-171-0/+24
| | | | | | | | | | | | | | Add a 'show thread poll' command that displays the poll information and fd's setup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>