summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp_vty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: adapt to version 2 of libyangChristian Hopps2021-05-131-1/+1
| | | | | | | | | Compile with v2.0.0 tag of `libyang2` branch of: https://github.com/CESNET/libyang staticd init load time of 10k routes now 6s vs ly1 time of 150s Signed-off-by: Christian Hopps <chopps@labn.net>
* *: move "show debugging ..." commands to enable nodeIgor Ryzhov2020-10-021-1/+1
| | | | | | Use the same node for "show debugging" commands in all daemons. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: move "debug ..." commands to enable nodeIgor Ryzhov2020-10-021-1/+1
| | | | | | Use the same node for "debug" commands in all daemons. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: introduce DEFPY_YANG & friendsRenato Westphal2020-08-031-14/+14
| | | | | | | | | | DEFPY_YANG will allow the CLI to identify which commands are YANG-modeled or not before executing them. This is going to be useful for the upcoming configuration back-off timer work that needs to commit pending configuration changes before executing a command that isn't YANG-modeled. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* vrrpd: Make clang 11 happyDonald Sharp2020-07-271-1/+1
| | | | | | | | | | | Recent changes to remove PRIu... in commit: 6cde4b45528e52819c803de92d10d4be3abddf29 causes clang 11 to be unhappy, with length of field warnings. Modify the offending code to compile properly using that compiler. I've tested against clang 11 and gcc 9.3 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: remove PRI[udx](8|16|32)David Lamparter2020-07-141-14/+14
| | | | | | | | | | | These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-161-0/+3
| | | | | | | And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
* *: move CLI parent data to cmd_node->parent_nodeDavid Lamparter2020-04-161-0/+1
| | | | | | | Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove second parameter on install_node()David Lamparter2020-04-161-3/+6
| | | | | | | | | | There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove cmd_node->vtyshDavid Lamparter2020-04-161-3/+0
| | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: clean up cmd_node initializersDavid Lamparter2020-04-161-3/+17
| | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* vrrpd, yang: cleanup vrrp nb conversionQuentin Young2019-12-091-38/+78
| | | | | | | | | | | | | | | | - Use correct units and conversions in model & code - Fix incorrect CLI help string for V6 virtual addrs - Fix nb get-entry callback for virtual router - Fix a couple style nits - Simplify some CLI code - Remove unused code - Remove unused YANG definitions - Update sighup() to handle reloads - Update interface level config writer to use NB callbacks - Add simplified `no` forms for priority and advertisement-interval commands Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: northbound conversionQuentin Young2019-12-091-142/+123
| | | | | | Convert VRRPD to use the northbound API. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: use CS2MS instead of constant 10 everywhereGhasem Naddaf2019-10-181-5/+7
| | | | | | | | Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com> vrrpd: use CS2MS instead of constant 10 everywhere Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
* *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* vrrpd: use MTYPE_STATICDavid Lamparter2019-06-211-1/+0
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* vrrpd, zebra: fix checkpatch warningsQuentin Young2019-05-171-2/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add 'show vrrp summary' commandQuentin Young2019-05-171-0/+69
| | | | | | Shows a brief summary table of all VRRP routers Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: fix magnitude error when removing adver_intQuentin Young2019-05-171-1/+1
| | | | | | | When resetting advertisement interval back to the default, we were dividing centiseconds by 10 instead of milliseconds. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: convert defaults command to millisecondsQuentin Young2019-05-171-3/+10
| | | | | | Missed this in the conversion from centiseconds to milliseconds. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd, lib: style fixesQuentin Young2019-05-171-5/+9
| | | | | | | | | Fixup: * Blank lines after declarations * Trailing whitespace * Braces and parentheses Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: display configured adv int in json outputQuentin Young2019-05-171-0/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: change all user facing times to msQuentin Young2019-05-171-22/+30
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: display primary address in json outputQuentin Young2019-05-171-2/+12
| | | | | | | | | And also, fill in the non-json output with a :: for the v6 primary since we're letting the operating system select which one it wants to use and we don't actually know what our primary address is. Another thing to revisit in the future... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: disallow setting priority = 255Quentin Young2019-05-171-1/+1
| | | | | | | | | Assuming we fix our automatic detection method in the future, we won't be able to revert this back to disallowing 255 without breaking user configs. Let's just disallow it now, there's no functional difference still. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: allow user to set priority = 255Quentin Young2019-05-171-1/+1
| | | | | | | | | | Too many problems with implicit ownership determination via duplicate address assignment. Will revisit that in the future. For now, allow user to specify 255 as a priority value. This is functionally no different than any other priority value; it just serves as a self-documenting way of saying you want one router to always be master. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: fix sign compare on armelQuentin Young2019-05-171-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add more debugging infoQuentin Young2019-05-171-0/+6
| | | | | | | * Add reason why we are discarding adverts * Add primary IP to show vrrp output Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: fix unsigned - signed cmpQuentin Young2019-05-171-1/+1
| | | | | | For some reason this warning only shows up on armel Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: check start for manual v6 addr addQuentin Young2019-05-171-0/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: allow configuring global defaultsQuentin Young2019-05-171-2/+29
| | | | | | | | | | | Allow configuring the following as global defaults: - Priority - Advertisement interval - Preempt mode - Administrative shutdown Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add statistics collectionQuentin Young2019-05-171-0/+37
| | | | | | | | | | Collect and display the following: - Advertisement Tx/Rx - GARP Tx/Rx - NDISC Tx/Rx - # transitions Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: follow frrouting json conventionsQuentin Young2019-05-171-10/+10
| | | | | | Use camelCase for json keys Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: cleanup formatting for vty show cmdQuentin Young2019-05-171-7/+20
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add json support to show commandQuentin Young2019-05-171-4/+97
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add administrative shutdown optionQuentin Young2019-05-171-0/+30
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: interface trackingQuentin Young2019-05-171-4/+6
| | | | | | | | | | | * Dynamically bind interfaces when they become available * Automatically start VRRP sessions when their interfaces are added or come up * Automatically shut down VRRP sessions when their interfaces are deleted or go down * Automatically unbind interfaces when they are deleted Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: fix err messaging for ipv6 addr addQuentin Young2019-05-171-2/+2
| | | | | | | * Add newline to message * Change pasted IPv4 to IPv6 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add support for configuration writingQuentin Young2019-05-171-7/+5
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: use debugging knobsQuentin Young2019-05-171-0/+4
| | | | | | | * Gate all debugging messages with the debugging system * Simplify a bit of debugging where it was easy to do inline Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add debugging knobsQuentin Young2019-05-171-14/+49
| | | | | | | * Add control structures for debugging * Add CLI commands for debugging Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: minor cosmetic fix for sh vrrpQuentin Young2019-05-171-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: fix missing \n in cliQuentin Young2019-05-171-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: autoconfig support, continuedQuentin Young2019-05-171-9/+10
| | | | | | | | * Add support for interface up/down + address add/del events when using autoconfigure mode * Add autoconfig information to show command Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: don't restart when changing priorityQuentin Young2019-05-171-28/+0
| | | | | | | Both master and backup should be able to react to priority changes without requiring a restart. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: autoconfig supportQuentin Young2019-05-171-0/+21
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add cli for preempt modeQuentin Young2019-05-171-0/+20
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: add support for VRRPv2Quentin Young2019-05-171-3/+16
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: handle address deletion, don't accept dupesQuentin Young2019-05-171-20/+58
| | | | | | | | | * Do nothing if user tries to add the same IP twice * Implement deletion of IPs * Deactivate virtual router if all IPs are deleted * Deduplicate add / remove code Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: same VRID, different interfaceQuentin Young2019-05-171-18/+28
| | | | | | | Identify VRRP instances by the 2-tuple (ifp, vrid) instead of by VRID, allowing the same instance to be configured on different interfaces. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>