summaryrefslogtreecommitdiffstats
path: root/vtysh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | eigrpd, lib, tests, vtysh: security (cppcheck)paco2018-06-191-1/+1
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | Merge pull request #2484 from pacovn/cppcheck_unused_varsDonald Sharp2018-06-181-0/+4
|\ \ | |/ |/| eigrpd, lib: unused vars (cppcheck)
| * eigrpd, lib, vtysh: unused vars (cppcheck)paco2018-06-181-0/+4
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | Merge pull request #2409 from LabNConsulting/working/master/vtysh-2400Quentin Young2018-06-151-3/+14
|\ \ | |/ |/| vtysh: -u fixes
| * vtysh: in user mode, don't show 'enable not allowed', also block writeconfigLou Berger2018-06-121-3/+14
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | vtysh: fix config writeQuentin Young2018-06-121-0/+3
| | | | | | | | | | | | | | Changing vtysh to use vty_out() for everything broke writing to config files. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #2402 from ↵Jafar Al-Gharaibeh2018-06-121-3/+2
|\ \ | |/ |/| | | | | qlyoung/germx-hand-sanitizer-kills-99-percent-of-germs *: disable all sanitizers for clippy build
| * *: disable all sanitizers for clippy buildQuentin Young2018-06-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | * Move configure flag propagations out of user flags * Use AC_SUBST to transfer flag values to Automake * Set default AM_CFLAGS and AM_CPPFLAGS in common.am and change child Makefiles to modify these base variables * Add flag override to turn off all sanitizers when building clippy * Remove LSAN suppressions blacklist as it's no longer needed Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | vtysh: null dereference (Coverity 1469896)paco2018-06-111-2/+4
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2298 from qlyoung/pipe-actions-vtyshRuss White2018-06-083-206/+221
|\ | | | | *: add support for `|` actions
| * lib: fix static analysis issues, use regfree()Quentin Young2018-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | * Fix potential NULL dereference * Fix use of uninitialized value * Fix leaking memory by not freeing regex_t * Fix extra \n when using empty regex filter * Clean up still-reachable hook memory * Handle nonexistent pager Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: style for | supportQuentin Young2018-06-061-1/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vtysh: add | supportQuentin Young2018-06-063-206/+218
| | | | | | | | | | | | | | | | | | | | | | * Rewrite pager implementation * Replace fprintf() with vty_out() * Modify vty_out() for better vtysh support * Remove static global outputfile var * Remove fp argument from many vtysh functions * Add some docs for stuff along the way Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | bgpd, lib, ospf6d, vtysh: fix possible snprintf possible truncationDonald Sharp2018-06-081-2/+2
| | | | | | | | | | | | | | | | | | With a new version of clang 6.0, the compiler is detecting more issues where we may be possibly be truncating the output string. Fix by increasing the size of the output string to make the compiler happy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | vtysh, zebra: Fix function parametersDonald Sharp2018-06-081-1/+1
|/ | | | | | | New version of clang are detecting function parameters that we should not be casting as such. Fix these issues. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* vtysh: fp can never be NULL at this point in codeDonald Sharp2018-06-051-1/+1
| | | | | | | | The fp pointer has already been dereferenced in all paths leading to the test for non NULL. Since we never crash we know it cannot be NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>