summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_vty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-158/+151
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* *: add missing \n in some help stringsRenato Westphal2017-10-241-2/+2
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-101-5/+5
| | | | | | | | | | This improves code readability and also future-proofs our codebase against new changes in the data structure used to store interfaces. The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but for now only babeld is using it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal2017-10-101-8/+8
| | | | | | | | | | | This is an important optimization for users running FRR on systems with a large number of interfaces (e.g. thousands of tunnels). Red-black trees scale much better than sorted linked-lists and also store the elements in an ordered way (contrary to hash tables). This is a big patch but the interesting bits are all in lib/if.[ch]. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: remove empty "interface XYZ" config blocksDavid Lamparter2017-08-291-2/+2
| | | | | | | | Using the previously-added vty_frame() support, this gets rid of all the pointless empty "interface XYZ" blocks that get added for any interface that shows up in the system (e.g. dummys, tunnels, etc.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Add 'show debugging' command from vtyshDonald Sharp2017-08-211-5/+5
| | | | | | | Allow vtysh to query every daemon about its debugging status in one go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrpd: fix issues found by coverityJorge Boncompte2017-08-101-1/+1
| | | | Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
* *: fix GCC 7 warnings/issuesDavid Lamparter2017-07-141-1/+0
| | | | | | | The label initializer & nhrpd variable are just to shut up GCC 7, the other two are actual bugs. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-141-2/+2
|\ | | | | | | | | | | Lots of conflicts from CMD_WARNING_CONFIG_FAILED... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * vtysh: return non-zero for configuration failuresDaniel Walton2017-07-131-2/+2
| | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This allows frr-reload.py (or anything else that scripts via vtysh) to know if the vtysh command worked or hit an error.
* | *: remove VTYNL, part 6 of 6David Lamparter2017-07-141-4/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 3 of 6David Lamparter2017-07-141-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 1 of 6David Lamparter2017-07-141-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 2 of 2David Lamparter2017-07-141-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-131-36/+36
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: vty_outln (vty, "") --> vty_out (vty, VTYNL)Quentin Young2017-06-291-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: s/VTY_NEWLINE/VTYNL/gQuentin Young2017-06-291-3/+3
| | | | | | Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-291-90/+78
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #754 from qlyoung/fix-argv-argRuss White2017-06-291-1/+1
|\ | | | | use argv->text where appropriate
| * *: use ->text and strmatch where appropriateQuentin Young2017-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Still need to go fix all the places where we do a 1-char strncmp... spatch follows ------------------ @asdf@ expression idx; @@ <... strcmp ( - argv[idx]->arg, + argv[idx]->text, ...) ...> @depends on asdf@ expression idx; @@ <... - !strcmp (argv[idx]->text, + strmatch (argv[idx]->text, ...) ...> @depends on asdf@ expression idx; expression arg; @@ <... - strcmp (argv[idx]->text, arg) == 0 + strmatch (argv[idx]->text, arg) ...> @depends on asdf@ expression idx; expression arg; @@ <... - strcmp (argv[idx]->text, arg) != 0 + !strmatch (argv[idx]->text, arg) ...> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: remove VTY_GET_*Quentin Young2017-06-271-4/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLI validates input tokens, so there's no need to do it in handler functions anymore. spatch follows ---------------- @getull@ expression v; expression str; @@ <... - VTY_GET_ULL(..., v, str) + v = strtoull (str, NULL, 10) ...> @getul@ expression v; expression str; @@ <... - VTY_GET_ULONG(..., v, str) + v = strtoul (str, NULL, 10) ...> @getintrange@ expression name; expression v; expression str; @@ <... - VTY_GET_INTEGER_RANGE(name, v, str, ...) + v = strtoul (str, NULL, 10) ...> @getint@ expression v; expression str; @@ <... - VTY_GET_INTEGER(..., v, str) + v = strtoul (str, NULL, 10) ...> @getv4@ expression v; expression str; @@ <... - VTY_GET_IPV4_ADDRESS(..., v, str) + inet_aton (str, &v) ...> @getv4pfx@ expression v; expression str; @@ <... - VTY_GET_IPV4_PREFIX(..., v, str) + str2prefix_ipv4 (str, &v) ...> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: simplify log message lookupQuentin Young2017-06-211-2/+2
| | | | | | | | | | | | | | | | log.c provides functionality for associating a constant (typically a protocol constant) with a string and finding the string given the constant. However this is highly delicate code that is extremely prone to stack overflows and off-by-one's due to requiring the developer to always remember to update the array size constant and to do so correctly which, as shown by example, is never a good idea.b The original goal of this code was to try to implement lookups in O(1) time without a linear search through the message array. Since this code is used 99% of the time for debugs, it's worth the 5-6 additional cmp's worst case if it means we avoid explitable bugs due to oversights... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* nhrpd: Fix missing include for 'access_list_init' functionDonald Sharp2017-05-281-0/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge remote-tracking branch 'origin/stable/3.0'Donald Sharp2017-05-241-0/+3
|\
| * nhrpd: install access-list commandsQuentin Young2017-05-191-0/+3
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | nhrpd: Fix some missing newlinesDonald Sharp2017-05-181-2/+2
|/ | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrpd: Fix cli changes missedDonald Sharp2017-04-251-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrp: implement 'no ip nhrp map' commandTimo Teräs2017-04-251-0/+27
| | | | was accidentally not implemented earlier
* nhrpd: implement 'show ip nhrp nhs'Timo Teräs2017-04-251-30/+58
|
* nhrpd: adapt to API changesDavid Lamparter2017-03-071-82/+78
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* nhrpd: implement next hop resolution protocolTimo Teräs2017-03-071-0/+928
This provides DMVPN support and integrates to strongSwan. Please read README.nhrpd and README.kernel for more details. [DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c] [DL: merge partially resolved, this commit will not build.] Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>