summaryrefslogtreecommitdiffstats
path: root/eigrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-5/+4
| | | | | | | 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-4/+4
| | | | | | 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-286/+202
| | | | | | | | | | | | | | | | | | | | | 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>
* 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-162-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/+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-162-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-162-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-162-4/+13
|/ | | | | | ... 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-1/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* eigrpd: stop checking for ancient OpenBSDRuben Kerkhof2020-03-111-1/+1
| | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* *: Replace `sizeof something` to sizeof(something)Donatas Abraitis2020-03-081-5/+5
| | | | | | Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis2020-03-053-7/+7
| | | | | | Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: Remove break after returnDonatas Abraitis2020-02-132-80/+0
| | | | | | Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* Merge pull request #5763 from ton31337/fix/return_without_parentRenato Westphal2020-02-101-1/+1
|\ | | | | *: Remove parenthesis on return for constants
| * *: Remove parenthesis on return for constantsDonatas Abraitis2020-02-091-1/+1
| | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | *: Replace s_addr 0 => INADDR_ANYDonatas Abraitis2020-02-063-6/+6
| | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | Merge pull request #5104 from opensourcerouting/route-map-nbv2Donald Sharp2020-02-051-0/+1
|\ \ | |/ |/| lib: migrate route map to use northbound
| * *: fix route map integrationRafael Zalamena2020-02-041-0/+1
| | | | | | | | | | | | | | Add the appropriated code to bootstrap route map northbound for all daemons. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | *: 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>
* eigrpd, ospfd, pimd: Fix assumption that interface may not be upDonald Sharp2019-12-042-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit: ddbf3e60604019d4b38d51226700e2244cc531b6 This commit modified the interface up handling code in ZAPI such that the zclient handled the decoding for you. Prior to this commit ospf assumed that it could use the old ifp pointer to know state before reading the stream. This lead to a situation where ospf would `smartly` track and do the right thing in this situation. This commit changed this assumption and in certain scenarios, say a interface was changed after it was already up would lead to situations where ospf would not properly handle the new interface up. Modify ospf to track data that is important to it in it's interface->info pointer. This code pattern was followed in both eigrp and pim. In eigrp's case it was just behaving weirdly in any event so fixing this pattern is not a big deal. In pim's case it was not properly using this so it's a no-op to fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: generously apply constDavid Lamparter2019-12-021-1/+1
| | | | | | 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>
* *: make all route_map_rule_cmd constDavid Lamparter2019-11-301-27/+58
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* eigrpd: Cleanup address dump functions to be a bit smarterDonald Sharp2019-11-222-45/+15
| | | | | | | The address dump functionality needed to be written a bit better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup eigrp_if_name_stringDonald Sharp2019-11-221-8/+5
| | | | | | | This function was excessively complicated. Simplify and make everyone use the same access macro. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd,eigrpd: don't take address of packed struct memberMark Stapp2019-11-111-4/+5
| | | | | | | | Use a local variable to avoid trying to take the address of a packed struct member - an address from the ip header in these cases. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: 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>
* *: Convert prefix_free to double pointerDonald Sharp2019-11-022-3/+2
| | | | | | Have the prefix_free code take a double pointer to free the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #5009 from donaldsharp/interface_deletionRuss White2019-09-303-148/+92
|\ | | | | lib, zebra: Allow for interface deletion when kernel event happens
| * *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-192-32/+13
| | | | | | | | | | | | | | 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-21/+7
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * *: Convert from ->interface_up to the interface callbackDonald Sharp2019-09-192-72/+41
| | | | | | | | | | | | | | 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-192-22/+9
| | | | | | | | | | | | | | 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-192-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | eigrpd: On creation of socket ensure vrf existsDonald Sharp2019-09-251-1/+4
|/ | | | | | | If the vrf does not exist, politely do not create the socket. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: rmap dep table is not correct in case of exact-match clausevdhingra2019-09-151-5/+1
| | | | | | | | | | | User pass the string match large-community 1 exact-match from CLI. Now route map lib has got the string as "1 exact-match". It passes the string to call back for compilation. BGP will parse this string and came to know that for "1" it has to do exact match. Routemap lib has to save "1" in it’s dependency table. Here routemap is saving this as a “1 exact-match” which is wrong. The solution is used the compiled data. Signed-off-by: vishaldhingra <vdhingra@vmware.com>
* eigrpd: Fix SA issue with setting but not usingDonald Sharp2019-09-041-1/+1
| | | | | | | | We assign a value to the eigrp data structure and then immediately overwrite it in the for loop. No need to do a eigrp_lookup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: frr_elevate_privs -> frr_with_privsDavid Lamparter2019-09-031-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #4888 from donaldsharp/rmap_cleanupDonatas Abraitis2019-09-031-4/+22
|\ | | | | Rmap cleanup
| * *: Convert some route map functions to return the enumDonald Sharp2019-09-031-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Conver these functions: route_map_add_match route_map_delete_match route_map_add_set route_map_delete_set To return the `enum rmap_compile_rets` and ensure all functions that use this code handle all the enumerated possible returns. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: When iterating over all eigrp instances, narrow to correct vrfDonald Sharp2019-08-071-1/+4
| | | | | | | | | | | | | | When iterating over all eigrp instances, narrow to the correct vrf that we are working on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert cli to be able to use [vrf NAME]Donald Sharp2019-08-071-62/+60
| | | | | | | | | | | | | | Modify the cli to allow us to specify the [vrf NAME] and also get rid of the usages of VRF_DEFAULT that we can. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_packet.c to not use VRF_DEFAULTDonald Sharp2019-08-071-8/+11
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_network.c to not use VRF_DEFAULTDonald Sharp2019-08-071-1/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Update eigrp_filter.c to use VRF_DEFAULTDonald Sharp2019-08-072-11/+11
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_hello.c to not use VRF_DEFAULTDonald Sharp2019-08-071-16/+5
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_neighor.c to not use VRF_DEFAULTDonald Sharp2019-08-073-37/+27
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>