summaryrefslogtreecommitdiff
path: root/eigrpd
AgeCommit message (Collapse)Author
2024-05-10*: Modify agentx to be allowed to be calledDonald Sharp
If you had a situation where an operator turned on ospfd with snmp but not ospf6d and agentx was configured then you get into a situation where ospf6d would complain that the config for agentx did not exist. Let's modify the code to allow this situation to happen. Fixes: #15896 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-21*: Add missing SPDX-License-Identifier for some .c/.h filesDonatas Abraitis
Adding them as others: GPL-2.0-or-later Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-21eigrpd: Drop unused filesDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-13eigrpd, mgmtd, ospf6d: frr_fini is lastDonald Sharp
I noticed that ospf6d always had a linked list memory leak. Tracking it down shows that frr_fini() shuts down the memory system and prints out memory not cleaned up. eigrpd, mgmtd and ospf6d all called cleanup functions after frr_fini leaving memory leaked that was not really leaked. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-03-04lib: add keychain northbound supportChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-02-01*: create a single registry of daemons' default port valuesMark Stapp
Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-27*: fix `frr_daemon_info` indentationDavid Lamparter
clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-24Merge pull request #15196 from idryzhov/nb-leaf-listDonald Sharp
lib: remove leaf-list xpath hack from northbound
2024-01-23lib: remove leaf-list xpath hack from northboundIgor Ryzhov
Currently, when editing a leaf-list, `nb_candidate_edit` expects to receive it's xpath without a predicate and the value in a separate argument, and then creates the full xpath. This hack is complicated, because it depends on the operation and on the caller being a backend or not. Instead, let's require to always include the predicate in a leaf-list xpath. Update all the usages in the code accordingly. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-22eigrpd: use correct autocompletion for distribute-list commandsIgor Ryzhov
Currently, we always use access-list autocompletion, even if configuring prefix-lists. We should differentiate. Also, use address-family-specific autocompletion. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-22eigrpd: convert distribute-list configuration to northboundIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-22lib: enable multiple instance support with distribute listsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-29lib: all: remove './' from xpath 22% speedupChristian Hopps
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-28Merge pull request #14811 from donaldsharp/zebra_final_shutdown_finallyChristian Hopps
Zebra final shutdown finally
2023-11-25Merge pull request #14867 from opensourcerouting/zclient-options-cleanupDonald Sharp
*: clean up `zclient` options
2023-11-23eigrpd: use default zclient optionsDavid Lamparter
`.receive_notify = false` is the default. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-22*: convert `struct interface->connected` to DLISTDavid Lamparter
Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-21*: Cleanup keychain on shutdownDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-02lib: convert if_zapi_callbacks into actual hooksDavid Lamparter
...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-10-10eigrp: use correct memory pool on interface deletionVolodymyr Huti
Trying to delete an interface during the test test_eigrp_topo1.py triggers a crash. ``` EIGRP: abort+0x12b EIGRP: _zlog_assert_failed+0x18c EIGRP: mt_count_free+0x56 EIGRP: qfree+0x2e EIGRP: eigrp_if_delete_hook+0x8c EIGRP: hook_call_if_del+0x5f EIGRP: if_delete_retain+0x1c EIGRP: if_delete+0xfb EIGRP: if_destroy_via_zapi+0x69 EIGRP: zclient_interface_delete+0x57 EIGRP: zclient_read+0x3d0 EIGRP: event_call+0xd8 EIGRP: frr_run+0x271 EIGRP: main+0x14b EIGRP: __libc_start_main+0xf3 EIGRP: _start+0x2e EIGRP: in thread zclient_read scheduled from lib/zclient.c:4514 zclient_event() ``` Signed-off-by: Volodymyr Huti <v.huti@vyos.io>
2023-07-25* : include event ptr in event_execute apiMark Stapp
Include an event ptr-to-ptr in the event_execute() api call, like the various schedule api calls. This allows the execute() api to cancel an existing scheduled task if that task is being executed inline. Signed-off-by: Mark Stapp <mjs@labn.net>
2023-06-26*: Rearrange vrf_bitmap_X api to reduce memory footprintDonald Sharp
When running all daemons with config for most of them, FRR has sharpd@janelle:~/frr$ vtysh -c "show debug hashtable" | grep "VRF BIT HASH" | wc -l 3570 3570 hashes for bitmaps associated with the vrf. This is a very large number of hashes. Let's do two things: a) Reduce the created size of the actually created hashes to 2 instead of 32. b) Delay generation of the hash *until* a set operation happens. As that no hash directly implies a unset value if/when checked. This reduces the number of hashes to 61 in my setup for normal operation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01eigrpd: dest_addr does not need to be set to NULLDonald Sharp
All paths of the loop set dest_addr at the start of the loop. No need to set it to NULL to immediately set it too something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert `struct event_master` to `struct event_loop`Donald Sharp
Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert struct thread_master to struct event_master and it's ilkDonald Sharp
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_timer_remain_XXX to event_timer_remain_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_execute to event_executeDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_cancelXXX to event_cancelXXXDonald Sharp
Modify the code base so that thread_cancel becomes event_cancel Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-20*: introduce function for sequence numbersRafael Zalamena
Don't directly use `time()` for generating sequence numbers for two reasons: 1. `time()` can go backwards (due to NTP or time adjustments) 2. Coverity Scan warns every time we truncate a `time_t` variable for good reason (verify that we are Y2K38 ready). Found by Coverity Scan (CID 1519812, 1519786, 1519783 and 1519772) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-09-12eigrpd: changes for code maintainabilitysri-mohan1
these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-06-16eigrpd: vrf variable name hides a parameter of the same nameDonald Sharp
vrf is a char * being passed in. Rename the vrf to be something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-11*: Properly use memset() when zeroingDonatas Abraitis
Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-02*: Fix spelling of ojbectDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-22eigrpd: Up convert to uint64_t before doing mathDonald Sharp
Intentionally up convert uint8_t and uint32_t values to a uint64_t before doing math to make Coverity happy. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-21*: rework renaming the default VRFIgor Ryzhov
Currently, it is possible to rename the default VRF either by passing `-o` option to zebra or by creating a file in `/var/run/netns` and binding it to `/proc/self/ns/net`. In both cases, only zebra knows about the rename and other daemons learn about it only after they connect to zebra. This is a problem, because daemons may read their config before they connect to zebra. To handle this rename after the config is read, we have some special code in every single daemon, which is not very bad but not desirable in my opinion. But things are getting worse when we need to handle this in northbound layer as we have to manually rewrite the config nodes. This approach is already hacky, but still works as every daemon handles its own NB structures. But it is completely incompatible with the central management daemon architecture we are aiming for, as mgmtd doesn't even have a connection with zebra to learn from it. And it shouldn't have it, because operational state changes should never affect configuration. To solve the problem and simplify the code, I propose to expand the `-o` option to all daemons. By using the startup option, we let daemons know about the rename before they read their configs so we don't need any special code to deal with it. There's an easy way to pass the option to all daemons by using `frr_global_options` variable. Unfortunately, the second way of renaming by creating a file in `/var/run/netns` is incompatible with the new mgmtd architecture. Theoretically, we could force daemons to read their configs only after they connect to zebra, but it means adding even more code to handle a very specific use-case. And anyway this won't work for mgmtd as it doesn't have a connection with zebra. So I had to remove this option. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-22*: cleanup ifp->vrf_idIgor Ryzhov
Since f60a1188 we store a pointer to the VRF in the interface structure. There's no need anymore to store a separate vrf_id field. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-13Merge pull request #10032 from opensourcerouting/build-fix-20211111Donald Sharp
build: assorted build system improvements, 2021-11 edition
2021-11-11*: Convert quagga_signal_X to frr_signal_XDonald Sharp
Naming functions/data structures more appropriately for the project we are actually in. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-11build: remove some useless intermediate librariesDavid Lamparter
These really serve no purpose other than slowing our build down. If there's a benefit to any of these, they can be readded. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-31lib: Add autocomplete for access-listsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-28lib: Add autocomplete for prefix-list under route-mapsDonatas Abraitis
``` exit1-debian-9(config-route-map)# match ip route-source prefix-list ? <cr> PREFIXLIST_NAME IP prefix-list name p1 p2 ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>