summaryrefslogtreecommitdiff
path: root/pathd
AgeCommit message (Collapse)Author
2023-10-31pathd: add no pcep commandFarid Mihoub
Add "no pcep" command in segment-routing/traffic-engineering context to deconfigure the whole pcep configuration (pce-config, pce and pcc). Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com> (cherry picked from commit 465130ac2a8ae48fbe5197676e54dfb681b327ad)
2023-10-31pathd: add no msd command in the pcc contextFarid Mihoub
Add the "no msd" command to deconfigure pcc/msd node. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com> (cherry picked from commit 444b08d16afa192c4a9d7209f1328ac95f7b289b)
2023-09-19pathd: replace ctime with ctime_rMark Stapp
No ctime - replace with ctime_r() Signed-off-by: Mark Stapp <mjs@labn.net>
2023-09-14pathd: reset pcc peer connection when pce options modifiedFarid Mihoub
Reset the PCC peer connection to take into account new changes of the PCE options. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-09-14pathd: add no command for pce/pce-config sub-commandsFarid MIHOUB
Add "no" command for pcep pce/pce-config sub-commands, this will mainly restart configured options to default values. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-06-26pathd: Stop and free synchronous Zebra client on pathd terminationDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-04-20Merge pull request #12933 from Orange-OpenSource/link_statePhilippe Guibert
lib: Update edge key in link state database
2023-04-07pathd: Update TE to new Link State Edge keyOlivier Dugeon
Following the modification of the edge key in link state database this patch updates the path_ted.c file to replace the old uint64_t edge key by the new ls_edge_key structure when searching for an edge. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2023-04-06*: Use a `struct prefix *p` instead of a `struct prefix` in functionsDonald Sharp
When passing a prefix into a function let's pass by address instead of pass by value. Let's save our stack space. 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_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-17Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp
*: convert to SPDX License identifiers
2023-02-10pathd: Remove extraneous include of version.hDonald Sharp
It's not needed in these compiles. So let's remove it. 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-31pathd: Add missing enum's to switch statementDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-27*: fix non-const northbound XPath format stringsDavid Lamparter
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-27*: apply proper format string attributesDavid Lamparter
So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-12-19pathd: fix SA warning in path_pcep_configMark Stapp
Fix an SA warning about a possibly-uninited local. Signed-off-by: Mark Stapp <mjs@labn.net>
2022-11-14pathd: display SRTE policy status when removing policyPhilippe Guibert
Create a function that logs the status of a given SR-TE policy. Add a call to this function when a policy is being removed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: some traces are added to 'debug pathd ted' command.Philippe Guibert
Some traces initially displayed will be hidden behind the vty command: 'debug pathd ted'. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: use a define to store the the length of endpoint stringPhilippe Guibert
The endpoint string is a 46 byte length buffer. Use a single place to store the length of that buffer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: add 'debug pathd policy' commandPhilippe Guibert
Add a new cli command to troubleshoort pathd daemon. Some traces initially enabled are hidden behind this cli command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: display path ted debugging statusPhilippe Guibert
On 'show debugging' call, display the status about ted debugging. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-03Merge pull request #12196 from opensourcerouting/xref-vtyshDonald Sharp
*: rewrite `extract.pl` using `xref` infra
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-26pathd: Make pathd happy with clang-16Donald Sharp
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
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-27Merge pull request #12018 from pguibert6WIND/pathd_warning_notedDonald Sharp
pathd: change the vty output, when no ted is enabled on pathd
2022-09-27Merge pull request #11910 from fdumontet6WIND/NAI_AdjOlivier Dugeon
pathd: nai adjacency fix query type f for IPV6
2022-09-26pathd: change the vty output, when no ted is enabled on pathdPhilippe Guibert
Change the vty output, in case ted is not enabled. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-09-20pathd: 'no mpls-te on' command was not workingPhilippe Guibert
Fix the 'no mpls-te on' command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-09-06 pathd: nai adjacency fix query type f for IPV6Francois Dumontet
This commit is dedicated to fix some issues in path_ted_query_type_f function. Issues are related to IPv6 implementation. -key is not based on the pertinent part of IPv6 address. -test on memcmp return value is mismatch. -wrong flag value tested (ipv4 against ipv6). -return adj_sid was the wrong one. Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2022-08-15pathd: Ensure path is free'd after we no longer need it.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-22pathd: add a zebra stop handlerPhilippe Guibert
This handler code is used to stop zebra related contexts. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.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-04build: first header *must* be zebra.h or config.hDavid Lamparter
This has already been a requirement for Solaris, it is still a requirement for some of the autoconf feature checks to work correctly, and it will be a requirement for `-fms-extensions`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-02*: Fix spelling of wetherDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-01*: Fix spelling of FollowingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-31isisd, lib, ospfd, pathd: Null out free'd pointerDonald Sharp
The commands: router isis 1 mpls-te on no mpls-te on mpls-te on no mpls-te on ! Will crash Valgrind gives us this: ==652336== Invalid read of size 8 ==652336== at 0x49AB25C: typed_rb_min (typerb.c:495) ==652336== by 0x4943B54: vertices_const_first (link_state.h:424) ==652336== by 0x493DCE4: vertices_first (link_state.h:424) ==652336== by 0x493DADC: ls_ted_del_all (link_state.c:1010) ==652336== by 0x47E77B: isis_instance_mpls_te_destroy (isis_nb_config.c:1871) ==652336== by 0x495BE20: nb_callback_destroy (northbound.c:1131) ==652336== by 0x495B5AC: nb_callback_configuration (northbound.c:1356) ==652336== by 0x4958127: nb_transaction_process (northbound.c:1473) ==652336== by 0x4958275: nb_candidate_commit_apply (northbound.c:906) ==652336== by 0x49585B8: nb_candidate_commit (northbound.c:938) ==652336== by 0x495CE4A: nb_cli_classic_commit (northbound_cli.c:64) ==652336== by 0x495D6C5: nb_cli_apply_changes_internal (northbound_cli.c:250) ==652336== Address 0x6f928e0 is 272 bytes inside a block of size 320 free'd ==652336== at 0x48399AB: free (vg_replace_malloc.c:538) ==652336== by 0x494BA30: qfree (memory.c:141) ==652336== by 0x493D99D: ls_ted_del (link_state.c:997) ==652336== by 0x493DC20: ls_ted_del_all (link_state.c:1018) ==652336== by 0x47E77B: isis_instance_mpls_te_destroy (isis_nb_config.c:1871) ==652336== by 0x495BE20: nb_callback_destroy (northbound.c:1131) ==652336== by 0x495B5AC: nb_callback_configuration (northbound.c:1356) ==652336== by 0x4958127: nb_transaction_process (northbound.c:1473) ==652336== by 0x4958275: nb_candidate_commit_apply (northbound.c:906) ==652336== by 0x49585B8: nb_candidate_commit (northbound.c:938) ==652336== by 0x495CE4A: nb_cli_classic_commit (northbound_cli.c:64) ==652336== by 0x495D6C5: nb_cli_apply_changes_internal (northbound_cli.c:250) ==652336== Block was alloc'd at ==652336== at 0x483AB65: calloc (vg_replace_malloc.c:760) ==652336== by 0x494B6F8: qcalloc (memory.c:116) ==652336== by 0x493D7D2: ls_ted_new (link_state.c:967) ==652336== by 0x47E4DD: isis_instance_mpls_te_create (isis_nb_config.c:1832) ==652336== by 0x495BB29: nb_callback_create (northbound.c:1034) ==652336== by 0x495B547: nb_callback_configuration (northbound.c:1348) ==652336== by 0x4958127: nb_transaction_process (northbound.c:1473) ==652336== by 0x4958275: nb_candidate_commit_apply (northbound.c:906) ==652336== by 0x49585B8: nb_candidate_commit (northbound.c:938) ==652336== by 0x495CE4A: nb_cli_classic_commit (northbound_cli.c:64) ==652336== by 0x495D6C5: nb_cli_apply_changes_internal (northbound_cli.c:250) ==652336== by 0x495D23E: nb_cli_apply_changes (northbound_cli.c:268) Let's null out the pointer. After this change. Valgrind no longer reports issues and isisd no longer crashes. Fixes: #10939 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-23pathd: bad order of nai adjacencies for ipv6Philippe Guibert
The order of nai adjacencies ipv6 addresses was wrong. The src and the destination addresses were swapped. Change it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.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-14pathd: Fix spelling mistakesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-19pathd: fix typo in pathd/path_ted.cYamato Sugawara
Signed-off-by: Yamato Sugawara <yamato.sugawara@linecorp.com>
2021-11-27*: Remove redundand braces for single statement blocksDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>