summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* ripngd: implement northbound callbacks to fetch neighbor informationRenato Westphal2018-12-032-11/+40
| | | | | | | The "neighbors" YANG container was copied and adapted from the ietf-rip module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: implement the 'clear-ripng-route' YANG RPCRenato Westphal2018-12-034-48/+52
| | | | | | | | The "clear ipv6 ripng" command was turned into a YANG RPC so that other northbound plugins can execute it as well. This RPC closely matches the 'clear-rip-route' RPC from the ietf-rip module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: fix SIGHUP handlingRenato Westphal2018-12-038-77/+0
| | | | | | | | | Now that all ripngd commands were converted to the new northbound model, the ripngd SIGHUP handler is capable of doing a full configuration reload just by calling the vty_read_config() function. Nothing else should be done in the SIGHUP handler. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'split-horizon' command to the new northbound modelRenato Westphal2018-12-035-93/+75
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'timer basic' command to the new northbound modelRenato Westphal2018-12-035-85/+87
| | | | | | | | | | | Trivial conversion. Use the northbound 'apply_finish()' callback so we'll call ripng_event() only once even if we change the three RIPng timers at the same time. Convert the timers to uint16_t to match their representation in the YANG model. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'aggregate-address' command to the new northbound modelRenato Westphal2018-12-035-91/+50
| | | | | | | | Trivial conversion. Remove the ripng->aggregate routing table and associated code because this variable was used only to show the running configuration. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'route' command to the new northbound modelRenato Westphal2018-12-035-93/+47
| | | | | | | | Trivial conversion. Remove the ripng->route routing table and associated code because this variable was used only to show the running configuration. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'redistribute' commands to the new northbound modelRenato Westphal2018-12-036-245/+137
| | | | | | | | | | | | | Trivial conversion. As usual, combine multiple DEFUNs into a single DEFPY for simplicity. As a bonus of the northbound conversion, this commit fixes the redistribution of certain protocols into ripngd. The 'redist_type' array used by the "redistribute" commands was terribly outdated, which was preventing the CLI to parse correctly certain protocols like isis and babel. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'passive-interface' command to the new northbound modelRenato Westphal2018-12-036-48/+57
| | | | | | Trivial conversion. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'offset-list' command to the new northbound modelRenato Westphal2018-12-036-279/+145
| | | | | | | | | | | | | | | | Remove the ripng_offset_list_set() and ripng_offset_list_unset() functions since they set/unset multiple configuration options at the same time. The northbound callbacks need to set/unset configuration options individually. The frr-ripngd YANG module models the "offset-list" command using a list keyed by the 'interface' and 'direction' leafs. One important detail is that the IFNAME parameter is optional, and when it's not present it means we want to match all interfaces. This is modeled using an interface name of '*' since list keys are mandatory leafs by definition in YANG. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'network' command to the new northbound modelRenato Westphal2018-12-036-81/+105
| | | | | | | | | | The frr-ripngd YANG module models the ripngd "network" command using two separate leaf-lists for simplicity: one leaf-list for interfaces and another leaf-list for actual networks. In the 'cli_show' callbacks, display the "network" command for entries of both leaf-lists. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'default-metric' command to the new northbound modelRenato Westphal2018-12-035-40/+46
| | | | | | | Trivial conversion. ripng->default_metric was converted to an uint8_t to match the way it's defined in the YANG module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'default-information' command to the new northbound modelRenato Westphal2018-12-035-49/+47
| | | | | | | | Trivial conversion. 'ripng->default_information' was removed because it was being used only to display the running configuration and thus is not necessary anymore. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'allow-ecmp' command to the new northbound modelRenato Westphal2018-12-035-42/+39
| | | | | | | Trivial conversion. The ripng->ecmp variable was converted to a boolean to match the way it's defined in the YANG module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: retrofit the 'router ripng' command to the new northbound modelRenato Westphal2018-12-035-58/+97
| | | | | | | | | | | | | | | | | | * Implement the northbound callbacks associated to the '/frr-ripngd:ripngd/instance' YANG path (the code is mostly a copy and paste from the original "router ripng" DEFUNs); * Move ripng_make_socket() out of ripng_create() since creating a socket is an error-prone operation and thus needs to be performed separately during the NB_EV_PREPARE phase; * On ripng_create(), fetch the defaults from the frr-ripngd YANG model; * Convert the "[no] router ripng" CLI commands to be dumb wrappers around the northbound callbacks; * On ripng_config_write(), write logic to call all 'cli_show' northbound callbacks defined under the '/frr-ripngd:ripngd/instance' YANG path. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* yang, ripngd: add 'frr-ripngd.yang' and associated stub callbacksRenato Westphal2018-12-036-0/+704
| | | | | | | | | | | | | | | | | | | | | | Introduce frr-ripngd.yang, which defines a model for managing the FRR ripngd daemon. Update the 'frr_yang_module_info' array of ripngd with the new 'frr-ripngd' module. Add two new files (ripng_cli.[ch]) which should contain all ripngd commands converted to the new northbound model. Centralizing all commands in a single place will facilitate the process of moving the CLI to a separate program in the future. Add automatically generated stub callbacks in ripng_northbound.c. These callbacks will be implemented gradually in the following commits. Add the confd.frr-ripngd.yang YANG module with annotations specific to the ConfD daemon. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Replace zclient_new with zclient_new_notifyDonald Sharp2018-11-121-1/+1
| | | | | | | It's been a year since we added the new optional parameters to instantiation. Let's switch over to the new name. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* yang, lib: add 'frr-interface.yang' and associated stub callbacksRenato Westphal2018-10-271-0/+1
| | | | | | | | | | | | | Introduce frr-interface.yang, which defines a model for managing FRR interfaces. Update the 'frr_yang_module_info' array of all daemons that will implement this module. Add automatically generated stub callbacks in if.c. These callbacks will be implemented in the following commit. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: add empty array of YANG modulesRenato Westphal2018-10-271-1/+7
| | | | | | | | | | FRR_DAEMON_INFO should now contain an array of 'frr_yang_module_info' structures describing the YANG modules implemented by the daemon. This array will be used by frr_init() function to load all YANG modules and initialize the northbound callbacks during the daemon initialization. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: introduce new northbound APIRenato Westphal2018-10-271-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: spelchekDavid Lamparter2018-10-251-2/+2
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Fixup to use proper list_cmp functionsDonald Sharp2018-10-191-1/+1
| | | | | | | We had a variety of issues with sorted list compare functions. This commit identifies and fixes these issues. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-023-5/+5
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: style for EC replacementsQuentin Young2018-09-131-3/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-132-4/+4
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* pimd ripd ripngd: variable shadowing fixesF. Aragon2018-09-121-7/+0
| | | | 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>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-15/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+8
| | | | | | | 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>
* bgpd, ripngd: Convert to using new agg_table/routeDonald Sharp2018-08-306-127/+131
| | | | | | | | Switch bgp and ripngd to use the new aggregate table and route data structures. This was mainly a search and replace operation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+1
| | | | | | | | The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* Merge pull request #2448 from qlyoung/error-reference-cardsDavid Lamparter2018-08-162-26/+26
|\ | | | | Error Reference Cards
| * *: frr_elevate_privs whitespace fixesDavid Lamparter2018-08-141-2/+2
| | | | | | | | | | | | (... and one superfluous variable removed) Signed-off-by: David Lamparter <equinox@diac24.net>
| * *: use frr_elevate_privs() (1/2: coccinelle)David Lamparter2018-08-142-25/+12
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
| * *: rename ferr_zlog -> flog_err_sysQuentin Young2018-08-142-12/+13
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: rename zlog_fer -> flog_errQuentin Young2018-08-142-10/+10
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * ripngd: Convert over to using LIB_ERR_XXXX for zlog_ferrDonald Sharp2018-08-142-14/+26
| | | | | | | | | | | | | | Convert over those zlog_err functions to zlog_ferr that are appropriate for the LIB_ERR_XXX. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib, ripngd, zebra: Remove pre-solaris 9 special cased codeDonald Sharp2018-08-151-1/+1
|/ | | | | | | | | The CMSG_FIRSTHDR was broken on solaris pre version 9. Version 9 was released in May of 2002 and EOL'ed in 2014. Version 8 EOL'ed in 2012. Remove special case code for a little used platform that has not seen the light of day in a very long time. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* libs, daemons: use const in route-map applyMark Stapp2018-07-231-6/+10
| | | | | | | Use 'const prefix *' in route-map apply apis; led to some corresponding changes in several daemons. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* Merge pull request #2620 from pacovn/PVS-Studio_null_check_2Quentin Young2018-07-031-2/+3
|\ | | | | bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)
| * bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)F. Aragon2018-07-031-2/+3
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | ripngd: variable scope overlap fix (PVS-Studio)F. Aragon2018-07-021-5/+5
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: remove -r from daemons except zebraQuentin Young2018-05-211-13/+18
| | | | | | | | | | | | | | | | | | | | | | This option is only implemented by 4 daemons: - BGPD - RIPD - RIPNGD - Zebra Manpages and documentation say that the option causes routes to not be uninstalled from zebra when the daemon terminates. This is true for RIPD and RIPNGD. This is not true for BGPD; in that daemon it only prevents transmission of Cease / Peer Unconfig NOTIFICATION messages to peers. Moreover, when any daemon disconnects from Zebra, all of its routes are uninstalled from Zebra and the kernel regardless of this option, rendering the option largely vestigial. It is still useful in Zebra, where it prevents all routes from being uninstalled when Zebra shuts down, so it is left there. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-277-46/+46
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: Track vrfs per nexthop not per route entryDonald Sharp2018-02-091-1/+1
| | | | | | | Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Send/receive the nexthop vrf_idDonald Sharp2018-01-121-0/+1
| | | | | | | Modify the code to send and receive to/from zebra the nexthops vrf_id. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Remove cvs control pointsDonald Sharp2017-12-051-2/+0
| | | | | | | | The $Id: lines would allow code kept in cvs to substitute the file version upon checkout. Since we are not using cvs there is no need to keep these lines anymore. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Make zapi route install Notifications optionalDonald Sharp2017-11-271-1/+1
| | | | | | | | | | | Allow the higher level protocol to specify if it would like to receive notifications about it's routes that it has installed. I've purposely made it part of zclient_new_notify because we need to track the routes on a per daemon basis only. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: fix coverity warnings - resource leaksRenato Westphal2017-10-241-6/+10
| | | | | | | | | | | | | | These are mostly trivial fixes for leaks in the error path of some functions. The changes in bgpd/bgp_mpath.c deserves a bit of explanation though. In the bgp_info_mpath_aggregate_update() function, we were allocating memory for the lcomm variable but doing nothing with it. Since the code for communities, extended communities and large communities is pretty much the same in this function, it's clear that this was a copy and paste error where most of the ext. community code was copied but not all of it as it should have been. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Modify zclient_init to require privs dataDonald Sharp2017-10-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>