summaryrefslogtreecommitdiffstats
path: root/vrrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6908 from qlyoung/vrrp-add-vrf-moduleRenato Westphal2020-08-131-0/+1
|\ | | | | vrrpd: add frr-vrf yang module
| * vrrpd: add frr-vrf yang moduleQuentin Young2020-08-121-0/+1
| | | | | | | | | | | | | | Can't have interfaces without vrf modules, since interfaces cross reference vrfs. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | vrrpd: log errmsg, stricter nb validationQuentin Young2020-08-111-2/+8
| | | | | | | | | | | | | | | | | | * When failing a config transaction due to a VRID conflict, describe the error in the provided space * When validating, allow the NB userdata lookup for interface object to soft fail; but when applying, assert if it does not exist Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | vrrpd: fix improper NB query during validationQuentin Young2020-08-111-5/+8
| | | | | | | | | | | | | | | | | | We were querying the NB for an interface and expecting it to exist, but we were doing this during a validation run when the interface hasn't yet been created, resulting in an abort. Adjust validation checks to handle this scenario. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | vrrpd: don't allow autocreated vr's in NB layerQuentin Young2020-08-111-3/+13
|/ | | | | | | | | | Changing properties on an autoconfigured VRRP instance results in its pointer being stored as a userdata in the NB tree, leading to UAF when autoconfigure deletes the instance and then later NB operations take place using the now-stale pointer. Ticket: CM-29850 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.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-273-4/+4
| | | | | | | | | | | 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-144-38/+31
| | | | | | | | | | | 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>
* *: have daemons call frr_fini() at terminationMark Stapp2020-06-111-0/+2
| | | | | | | | Fix a number of library and daemon issues so that daemons can call frr_fini() during normal termination. Without this, temporary logging files are left behind in /var/tmp/frr/. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: integrate remaining daemons with filterRafael Zalamena2020-06-051-0/+1
| | | | | | | Don't crash when trying to `show running-config` because of missing filter northbound integration. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-2/+3
| | | | | | | These are easy to get subtly wrong, and doing so can cause nondeterministic failures when racing in parallel builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: use VPATH for vtysh_scanDavid Lamparter2020-04-271-1/+1
| | | | | | No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: change the signature of the northbound callbacks to be more flexibleRenato Westphal2020-04-231-143/+123
| | | | | | | | | | | | | | | | | | | | | Having a fixed set of parameters for each northbound callback isn't a good idea since it makes it difficult to add new parameters whenever that becomes necessary, as several hundreds or thousands of existing callbacks need to be updated accordingly. To remediate this issue, this commit changes the signature of all northbound callbacks to have a single parameter: a pointer to a 'nb_cb_x_args' structure (where x is different for each type of callback). These structures encapsulate all real parameters (both input and output) the callbacks need to have access to. And adding a new parameter to a given callback is as simple as adding a new field to the corresponding 'nb_cb_x_args' structure, without needing to update any instance of that callback in any daemon. This commit includes a .cocci semantic patch that can be used to update old code to the new format automatically. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: 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>
* *: Do not cast to the same typeDonatas Abraitis2020-04-081-2/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* Merge pull request #5919 from qlyoung/fix-vrrp-mvl-uafDonatas Abraitis2020-03-091-6/+50
|\ | | | | vrrpd: Fix heap uaf when handling interface deletions
| * vrrpd: search all vr's for mvl_ifp to nullQuentin Young2020-03-051-32/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous patch was not sufficient to make sure the pointers get nulled. Reason being is that vrrp_lookup_by_if_mvl() follows the link_ifindex on the provided interface to acquire the base ifp, which is then used to lookup the VR. However, because FRR's interface management is straight up insane, it's possible that we delete the base interface before its children. When this happens, link_ifindex is still valid for the macvlan device but we have no interface corresponding to that ifindex, so our lookup will fail. Consequently vrrp_lookup_by_if_mvl() can't be used if we are handling deletion of any sort. Instead we have to loop through every VR and check the pointers. Also, there's no null check on the mvl_ifp pointer in vrrp_shutdown(), and even though we log that we're returning early from it, we actually don't. Do both of these things. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: always null mvl_ifp ptr when mvl is deletedQuentin Young2020-03-051-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | When we get a deletion notification for the macvlan device, we need to do two things. First, down the VRRP session if it's up. Second, since the mvl device is dynamic (i.e. not explicitly configured by FRR) it will be deleted upon return from the callback, so we need to drop the pointer to it. The checks for the first and second one were one check so the pointer was only nulled when the session was already up, leading to a later heap UAF on the mvl ifp. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | vrrpd: fix build on Fedora RawhideRuben Kerkhof2020-03-071-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following linker errors: make[1]: Entering directory '/home/ruben/src/frr' CCLD vrrpd/vrrpd /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here /usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here collect2: error: ld returned 1 exit status make[1]: *** [Makefile:6639: vrrpd/vrrpd] Error 1 make[1]: Leaving directory '/home/ruben/src/frr' make: *** [Makefile:4525: all] Error 2 Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* | *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis2020-03-051-1/+1
|/ | | | | | Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: Return bool type for bool functionsDonatas Abraitis2020-03-041-3/+3
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: Use short version of bool expressionsDonatas Abraitis2020-03-041-3/+3
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #5314 from qlyoung/yang-vrrpRenato Westphal2020-01-087-253/+1042
|\ | | | | VRRP northbound conversion
| * vrrpd, yang: cleanup vrrp nb conversionQuentin Young2019-12-095-126/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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: remove unused variablesQuentin Young2019-12-091-4/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: remove unused variable in nbQuentin Young2019-12-091-4/+2
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: northbound conversionQuentin Young2019-12-097-146/+972
| | | | | | | | | | | | Convert VRRPD to use the northbound API. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: allow vrrp_shutdown() on shutdown rtrQuentin Young2019-12-091-2/+3
| | | | | | | | | | | | No need for a state check before the call, although still a good idea Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: const vrrp_lookup()Quentin Young2019-12-092-3/+3
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * vrrpd: make vrrp_[add|del]_ip not insaneQuentin Young2019-12-092-11/+16
| | | | | | | | | | | | | | | | For some reason I made these functions require you to pass the correct (v4 or v6) router when we could determine it from the type of address passed; fix this Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | vrrpd: support namespace vrf tooQuentin Young2019-12-181-2/+4
| | | | | | | | | | | | -.- Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | vrrpd: add vrf supportQuentin Young2019-12-092-9/+35
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | vrrpd: handle failure to lookup parent ifaceQuentin Young2019-12-091-0/+9
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: generously apply constDavid Lamparter2019-12-024-9/+6
| | | | | | const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: make frr_yang_module_info constDavid Lamparter2019-11-301-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* vrrpd: some more error logging fixesQuentin Young2019-10-301-3/+9
| | | | | | | | - Give the correct log message when refusing to start because the vr is already started - Fix a couple other : whynot; cases missed Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: only count ipv4 addresses on check startGhasem Naddaf2019-10-291-6/+6
| | | | Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
* vrrpd: fix startup error message reportingQuentin Young2019-10-211-9/+11
| | | | | | | | | | | | | Due to some extremely shoddy programming on my part, the error messages for certain errors was pretty much always wrong. We would start with the correct error message, then on the next check, regardless of whether it passed or failed, we would null out the error message, then on the next one set it again (to the wrong message), then null it, and just keep alternating. So errors were sometimes not being reported, sometimes being reported correctly (if the condition parity happened to match the appropriate condition), and sometimes being reported correctly. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: use CS2MS instead of constant 10 everywhereGhasem Naddaf2019-10-182-13/+15
| | | | | | | | 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>
* *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-191-18/+2
| | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert interface_down to interface down callbackDonald Sharp2019-09-191-20/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert from ->interface_up to the interface callbackDonald Sharp2019-09-191-21/+2
| | | | | | | For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Switch all zclient->interface_add to interface create callbackDonald Sharp2019-09-191-20/+2
| | | | | | | Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-193-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: frr_elevate_privs -> frr_with_privsDavid Lamparter2019-09-033-9/+5
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>