summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: 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>
* ripngd: Make 'struct zebra_privs_t' availableDonald Sharp2017-10-243-5/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #1298 from opensourcerouting/iface-rb-treeDonald Sharp2017-10-162-21/+21
|\ | | | | Use rb-trees to store interfaces instead of linked-lists
| * *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-102-10/+10
| | | | | | | | | | | | | | | | | | | | 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>
| * *: introduce new rb-tree to optimize interface lookup by ifindexRenato Westphal2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance tests showed that, when running on a system with a large number of interfaces, some daemons would spend a considerable amount of time in the if_lookup_by_index() function. Introduce a new rb-tree to solve this problem. With this change, we need to use the if_set_index() function whenever we want to change the ifindex of an interface. This is necessary to ensure that the 'ifaces_by_index' rb-tree is updated accordingly. The return value of all insert/remove operations in the interface rb-trees is checked to ensure that an error is logged if a corruption is detected. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * *: eliminate IFINDEX_DELETED in favor of IFINDEX_INTERNALRenato Westphal2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | IFINDEX_DELETED is not necessary anymore as we moved from a global list of interfaces to a list of interfaces per VRF. This reverts commit 84361d615. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * *: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal2017-10-102-20/+20
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ripngd: Fix possible memory leak of route_nodeDonald Sharp2017-10-101-0/+2
|/ | | | | | | There exists a path where we do not save the route_node after creation. Allow cleanup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ripngd: fix clang warningVincent JARDIN2017-10-081-1/+1
| | | | | | this value len is not used for this vty_out() case. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
* *: use argv[]->text instead of argv[]->arg when appropriateRenato Westphal2017-10-061-12/+4
| | | | | | | | Incomplete commands like "debug ospf6 route mem" were being ignored. The changes in ripd and ripngd are intended to make the code easier to read, no bugs were fixed in these two daemons. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Convert list_free usage to list_deleteDonald Sharp2017-10-051-3/+2
| | | | | | | | | | list_free is occassionally being used to delete the list and accidently not deleting all the nodes. We keep running across this usage pattern. Let's remove the temptation and only allow list_delete to handle list deletion. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-053-3/+3
| | | | | | | | | | | | | | | | | | | Convert the list_delete(struct list *) function to use struct list **. This is to allow the list pointer to be nulled. I keep running into uses of this list_delete function where we forget to set the returned pointer to NULL and attempt to use it and then experience a crash, usually after the developer has long since left the building. Let's make the api explicit in it setting the list pointer to null. Cynical Prediction: This code will expose a attempt to use the NULL'ed list pointer in some obscure bit of code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: fix segfault when sending more than MULTIPATH_NUM nexthopsRenato Westphal2017-09-211-0/+2
| | | | | | | | | | | | | This is a fallout from PR #1022 (zapi consolidation). In the early days, the client daemons would allocate enough memory to send all nexthops to zebra. Then zebra would add all nexthops to the RIB and respect MULTIPATH_NUM only when installing the routes in the kernel. Now things are different and the client daemons can send at most MULTIPATH_NUM nexthops to zebra, and failure to respect that will result in a buffer overflow. The MULTIPATH_NUM limit in the new zebra API is a small price we pay to avoid allocating memory for each route sent to zebra. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: make all daemons call frr_fini() on exitRenato Westphal2017-09-121-0/+1
| | | | | | This allow us to find real leaks more easily with tools like valgrind. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #1075 from donaldsharp/rip_metricDavid Lamparter2017-09-051-18/+24
|\ | | | | lib, ospfd, ripd, ripngd: Fix 'set metric'
| * lib, ospfd, ripd, ripngd: Fix 'set metric'Donald Sharp2017-08-291-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a variety of cli's associated with the 'set metric ...' command. The problem that we are experiencing is that not all the daemons support all the varieties of the set metric and the returned of NULL during the XXX_compile phase for these unsupported commands is causing issues. Modify the code base to only return NULL if we encounter a true parsing issue. Else we need to keep track if this metric applies to us or not. In the case of rip or ripngd if the metric passed to us is greater than 16 just turn it internally into a MAX_METRIC. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #1078 from dwalton76/ospfd-network-cmd-warningRenato Westphal2017-08-311-4/+4
|\ \ | | | | | | *: return CMD_WARNING if command was already configured
| * | *: return CMD_WARNING if command was already configuredDaniel Walton2017-08-311-4/+4
| |/ | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> If the user configures some command that is already in the config we should return CMD_WARNING instead of CMD_WARNING_CONFIG_FAILED
* | Merge pull request #1044 from donaldsharp/combinationJafar Al-Gharaibeh2017-08-311-0/+2
|\ \ | | | | | | Coverity Cleanup of Stuff
| * | *: fix assorted issues detected by Coverity ScanRenato Westphal2017-08-251-0/+2
| |/ | | | | | | 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>
* *: use zapi_route to send/receive redistributed routes as wellRenato Westphal2017-08-241-58/+18
| | | | | | | | | | | | | | | | | | Some differences compared to the old API: * Now the redistributed routes are sent using address-family independent messages (ZEBRA_REDISTRIBUTE_ROUTE_ADD and ZEBRA_REDISTRIBUTE_ROUTE_DEL). This allows us to unify the ipv4/ipv6 zclient callbacks in the client daemons and thus remove a lot of duplicate code; * Now zebra sends all nexthops of the redistributed routes to the client daemons, not only the first one. This shouldn't have any noticeable performance implications and will allow us to remove an ugly exception we had for ldpd (which needs to know all nexthops of the redistributed routes). The other client daemons can simply ignore the nexthops if they want or consult just the first one (e.g. ospfd/ospf6d/ripd/ripngd). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd/ripngd: use the new API to send routes to zebraRenato Westphal2017-08-231-33/+18
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: remove leftovers from "router zebra"Renato Westphal2017-08-231-56/+0
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: reduce excessive indentation in a few placesRenato Westphal2017-08-231-93/+88
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #1009 from donaldsharp/show_cmdsDavid Lamparter2017-08-211-6/+6
|\ | | | | Show cmds
| * *: Add 'show debugging' command from vtyshDonald Sharp2017-08-211-6/+6
| | | | | | | | | | | | | | Allow vtysh to query every daemon about its debugging status in one go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib: replace if_add_hook with hook_* logicDavid Lamparter2017-08-151-2/+2
|/ | | | | | | This allows modules to register their own additional hooks on interface creation/deletion. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp2017-08-094-29/+47
|\ | | | | more non-recursive build, fix cross-compile, & doc build mangling
| * build: non-recursive ripd & ripngdDavid Lamparter2017-08-044-29/+47
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: Define the number of seconds in a Day, Week and yearDonald Sharp2017-08-081-4/+0
|/ | | | | | | | | | | | | The defines: ONE_DAY_SECOND ONE_WEEK_SECOND ONE_YEAR_SECOND were being defined all over the system, move the define to a central location. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ripngd: Fix failure returned with some debug commandsDonald Sharp2017-07-241-3/+3
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Revert "*: reindent pt. 2"David Lamparter2017-07-223-13/+7
| | | | | | | | | This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindent pt. 2whitespace / reindent2017-07-173-7/+13
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-1715-5019/+4768
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-145-31/+31
|\ | | | | | | | | | | 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-135-31/+31
| | | | | | | | | | | | | | 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-142-9/+7
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 4 of 6David Lamparter2017-07-141-12/+7
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 2 of 6David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 1 of 6David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 2 of 2David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-136-71/+71
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: Fix zclient cleanup on shutdownDonald Sharp2017-06-303-0/+9
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>