summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: unify thread/event cancel macrosMark Stapp2020-10-231-1/+1
| | | | | | | | | Replace all lib/thread cancel macros, use thread_cancel() everywhere. Only the THREAD_OFF macro and thread_cancel() api are supported. Also adjust thread_cancel_async() to NULL caller's pointer (if present). Signed-off-by: Mark Stapp <mjs@voltanet.io>
* * : update signature of thread_cancel apiMark Stapp2020-10-234-30/+8
| | | | | | | | Change thread_cancel to take a ** to an event, NULL-check before dereferencing, and NULL the caller's pointer. Update many callers to use the new signature. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ripngd: Convert to using %pFXDonald Sharp2020-10-172-38/+23
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ripngd: Intentionally ignore return code for str2prefix_ipv6Donald Sharp2020-10-111-1/+1
| | | | | | | | We are calling str2prefix_ipv6 for a default route. Since we know this will always succeed we can safely tell the compiler that we are ok ignoring the return code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #7222 from idryzhov/fix-debugRenato Westphal2020-10-101-1/+1
|\ | | | | fix debug commands node inconsistencies
| * *: 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>
* | rip(ng)d: fix interfaces cleaningIgor Ryzhov2020-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | rip(ng)d_instance_disable unlinks the vrf from the instance which means that rip(ng)_interfaces_clean never works, because rip(ng)->vrf is always NULL there. This leads to the crash #6477. Clean interfaces before disabling the instance to fix the issue. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | *: add errmsg to nb rpcChirag Shah2020-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Display human readable error message in northbound rpc transaction failure. In case of vtysh nb client, the error message will be displayed to user. Testing: bharat# clear evpn dup-addr vni 1002 ip 11.11.11.11 Error type: generic error Error description: Requested IP's associated MAC aa:aa:aa:aa:aa:aa is still in duplicate state Signed-off-by: Chirag Shah <chirag@nvidia.com>
* | vtysh: dynamically generate the list of daemons for commandsIgor Ryzhov2020-10-021-0/+1
|/ | | | | | | Some daemons were actually missing from the static definitions: nhrpd, babeld, eigrpd and bfdd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: move all userdata when changing node xpathIgor Ryzhov2020-09-241-0/+7
| | | | | | The same thing was done for interfaces in commit f7c20aa1f. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripd, ripngd: info -> debugDonald Sharp2020-09-211-4/+5
| | | | | | | There are a couple info messages in rip/ripng that really should be debugs. Modify code to be so. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: introduce DEFPY_YANG & friendsRenato Westphal2020-08-031-17/+17
| | | | | | | | | | 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>
* *: un-split strings across linesDavid Lamparter2020-07-141-2/+1
| | | | | | | | | | | | | | | | | Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* *: add filter northbound supportRafael Zalamena2020-06-051-0/+1
| | | | | | Allow all daemons to work with filter northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* zebra: optimize the RIB get_next() callbackRenato Westphal2020-05-161-0/+1
| | | | | | | When fetching the next route node in the RIB, skip the empty ones to avoid calling other northbound callbacks later unnecessarily. Signed-off-by: Renato Westphal <renato@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-3/+3
| | | | | | 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-234-353/+260
| | | | | | | | | | | | | | | | | | | | | 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>
* *: replace all random() callsRafael Zalamena2020-04-181-2/+3
| | | | | | | | | | | Replace all `random()` calls with a function called `frr_weak_random()` and make it clear that it is only supposed to be used for weak random applications. Use the annotation described by the Coverity Scan documentation to ignore `random()` call warnings. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* Merge pull request #6247 from FRRouting/nb_conversionsDonald Sharp2020-04-171-0/+1
|\ | | | | Merge nb_converions branch to master
| * *: include vrf northbound module in initChirag Shah2020-04-161-0/+1
| | | | | | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-163-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-162-0/+2
| | | | | | | | | | | | | | 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-163-3/+9
| | | | | | | | | | | | | | | | | | | | 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-163-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-163-4/+9
|/ | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd, lib, ripngd: Add agg_node_get_prefixDonald Sharp2020-03-244-37/+25
| | | | | | | | | Modify code to use lookup function agg_node_get_prefix() as the abstraction layer. When we rework bgp_node to bgp_dest this will allow us to greatly limit the amount of work needed to do that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #5927 from mjstapp/interval_string_apiDonald Sharp2020-03-171-12/+3
|\ | | | | lib, *: add a common time interval formatting api
| * lib, *: add a common time interval formatting apiMark Stapp2020-03-091-12/+3
| | | | | | | | | | | | | | | | Add a common api that formats a time interval into a string with different output for short and longer intervals. We do this in several places, for cli/ui output. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | treewide: fix some issues found with -Werror=undefRuben Kerkhof2020-03-101-1/+1
|/ | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* *: Replace `sizeof something` to sizeof(something)Donatas Abraitis2020-03-081-1/+1
| | | | | | Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* Merge pull request #5916 from mjstapp/fix_gmtimeQuentin Young2020-03-052-13/+13
|\ | | | | *: use gmtime_r exclusively
| * *: use gmtime_r, localtime_r exclusivelyMark Stapp2020-03-052-13/+13
| | | | | | | | | | | | Stop using gmtime() or localtime() everywhere. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis2020-03-051-3/+3
|/ | | | | | Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* ripngd: Add vrf name to debug outputDonald Sharp2020-02-141-14/+30
| | | | | | | The vrf id is insufficient of a discriminator in people's head Give them what they need. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #5104 from opensourcerouting/route-map-nbv2Donald Sharp2020-02-051-0/+2
|\ | | | | lib: migrate route map to use northbound
| * *: fix route map integrationRafael Zalamena2020-02-041-0/+2
| | | | | | | | | | | | | | Add the appropriated code to bootstrap route map northbound for all daemons. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | *: remove null check before XFREEQuentin Young2020-02-041-2/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: don't null after XFREE; XFREE does this itselfQuentin Young2020-02-031-1/+0
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.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>
* ripngd: Fix redistribute/no redistribute rinse repeat commandsDonald Sharp2020-01-011-2/+2
| | | | | | | | | | ripngd was using zclient_redistribute for installation but not for removal. As such the lib/zclient.c was not properly tracking add/removal. I think it would be best to just let ripng to track this instead of zclient. Fixes: #5599 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ripd, ripngd: Free up list after call into nb_cli_rpcDonald Sharp2019-12-131-1/+6
| | | | | | | We have a clear memory leak after running `clear ip rip` Fix this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: rename memory_vty.c to lib_vty.cDavid Lamparter2019-12-061-1/+0
| | | | | | And memory_init() to lib_cmd_init(). 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>
* *: make all route_map_rule_cmd constDavid Lamparter2019-11-301-16/+32
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Convert connected_free to a double pointerDonald Sharp2019-11-021-1/+1
| | | | | | Set the connected pointer to set the pointer to NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ripngd: split northbound callbacks into multiple filesRenato Westphal2019-10-3011-1298/+1495
| | | | | | | | | | | | | | | | | Rearrange the ripngd northbound callbacks as following: * ripng_nb.h: prototypes of all northbound callbacks. * ripng_nb.c: definition of all northbound callbacks and their associated YANG data paths. * ripng_nb_config.c: implementation of YANG configuration nodes. * ripng_nb_state.c: implementation of YANG state nodes. * ripng_nb_rpcs.c: implementation of YANG RPCs. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: strip trailing whitespaceQuentin Young2019-09-302-3/+3
| | | | | | Some of it has snuck by CI Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-192-22/+1
| | | | | | | 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-192-18/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>