summaryrefslogtreecommitdiffstats
path: root/pathd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build: make builddir include path consistentDavid Lamparter2021-04-214-4/+4
| | | | | | | ... by referencing all autogenerated headers relative to the root directory. (90% of the changes here is `version.h`.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: don't use $(top_srcdir) in vtysh_scanDavid Lamparter2021-04-131-2/+2
| | | | | | It's not necessary and can confuse scripts. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #8100 from qlyoung/remove-sample-conf-filesDavid Lamparter2021-04-132-42/+0
|\
| * *: remove *.conf.sample filesQuentin Young2021-04-092-42/+0
| | | | | | | | | | | | | | | | | | | | Most of these are many, many years out of date. All of them vary randomly in quality. They show up by default in packages where they aren't really useful now that we use integrated config. Remove them. The useful ones have been moved to the docs. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | Merge pull request #8421 from opensourcerouting/xrelfo-armMark Stapp2021-04-121-2/+3
|\ \ | | | | | | fix xrelfo on ARM(32) & cross-compile
| * | build: don't link pathd/path_main.c twiceDavid Lamparter2021-04-091-2/+3
| |/ | | | | | | | | | | | | | | Can't have things duplicate in libpath.a and pathd directly, they'll crash into eath other on linking. No idea why this doesn't error out in our CI builds, but it definitely breaks LTO builds. Signed-off-by: David Lamparter <equinox@diac24.net>
* / lib: use platform-neutral value for TCP MD5 signature lenMark Stapp2021-04-091-1/+1
|/ | | | | | | Use a pcep-specific value for MD5SIG_MAXLEN, use the OS value if present. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* Merge pull request #8250 from idryzhov/fix-nb-running-get-entryRenato Westphal2021-03-241-4/+4
|\ | | | | Fix aborts when using nb_running_get_entry during validation stage
| * *: fix aborts when validating configurationIgor Ryzhov2021-03-161-4/+4
| | | | | | | | | | | | | | | | | | There are places in the code where function nb_running_get_entry is used with abort_if_not_found set to true during the config validation stage. This is incorrect because when used in transactional CLI, the running entry won't be set until the apply stage, and such usage leads to crash. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | Merge pull request #8307 from opensourcerouting/mtypes-cleanup-20210322Russ White2021-03-2313-118/+16
|\ \ | | | | | | isisd, eigrpd, pathd: clean up & drop *_memory.[ch] files, make a whole bunch static
| * | pathd: kill *_memory.[ch]David Lamparter2021-03-2213-118/+16
| | | | | | | | | | | | | | | | | | Ouch, MTYPE_PCEP is used in 81 places :( Signed-off-by: David Lamparter <equinox@diac24.net>
* | | Merge pull request #8303 from volta-networks/fix_coverity_pceplibDonald Sharp2021-03-221-1/+1
|\ \ \ | |/ / |/| | pceplib: Fixing coverity messages.
| * | pceplib: Fixing coverity messages.Javier Garcia2021-03-201-1/+1
| | | | | | | | | | | | Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* | | Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis2021-03-2211-26/+28
|\ \ \ | |/ / |/| | *: require ISO C11 + semicolons after file-scope macros
| * | *: require semicolon after FRR_DAEMON_INFO & co.David Lamparter2021-03-172-2/+4
| | | | | | | | | | | | | | | | | | ... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
| * | *: require semicolon after DEFINE_<typesafe...>David Lamparter2021-03-172-6/+6
| | | | | | | | | | | | | | | | | | Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | *: require semicolon after DEFINE_HOOK & co.David Lamparter2021-03-172-6/+6
| | | | | | | | | | | | | | | | | | See previous commit. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-176-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
* | | pathd: remove mid-string line breaksDavid Lamparter2021-03-172-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | cf. workflow.rst ("lines over 80 characters are allowed for text strings to make it possible to search the code for them"), matching Linux kernel coding style. Signed-off-by: David Lamparter <equinox@diac24.net>
* | | pathd: use %pIA to print struct ipaddr *David Lamparter2021-03-171-25/+13
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | | pathd: fix %pI4 <> %pI6 snafuDavid Lamparter2021-03-171-1/+1
|/ / | | | | | | | | | | ... as noted by the frr-format GCC plugin. Signed-off-by: David Lamparter <equinox@diac24.net>
* / pceplib: Integrate pcelib into frrJavier Garcia2021-03-0514-199/+254
|/ | | | | | Signed-off-by: Brady Johnson <brady@voltanet.io> Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* pathd: add meaningful names to threadsJavier Garcia2021-01-192-2/+2
| | | | Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* Merge pull request #7830 from volta-networks/misc_fixes_2021Donatas Abraitis2021-01-111-1/+2
|\ | | | | Misc fixes (bgpd, pathd, tools)
| * pathd, tools: fix peer preference configEmanuele Di Pascale2021-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | on one hand, the default value for a peer preference was always being displayed, and on the other there was some code in frr-reload.py which was attempting to add a default value to match this behavior, and which was incorrectly overriding a specified preference. Fix this by removing this code and making pathd behave like other daemons in this respect, i.e. not displaying the default value. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | Merge pull request #7785 from volta-networks/fix_show_pce_confidence_for_prDonald Sharp2021-01-093-2/+7
|\ \ | |/ |/| Add level of confidence to show pcep-session
| * pathd: Add level of confidence to show pcep-sessionJavier Garcia2020-12-223-2/+7
| | | | | | | | | | | | | | Show 'low' if a pce has disconnect or 'normal' . It's only a boolean so it's like a token that mark the pce that has recenty disconnect. Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* | pathd: Convert to use our internal frr_weak_randomDonald Sharp2021-01-052-2/+4
| | | | | | | | | | | | | | rand() should not be used, we should be using the frr_weak_random() call instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | pathd: Fix unlock of non-locked mutexDonald Sharp2021-01-041-2/+0
| | | | | | | | | | | | | | We have several instances of a non-locked mutex being unlocked in path_zebra_router_id_update. Clean this up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | pathd: fix compile warning in path_cliMark Stapp2020-12-211-1/+1
|/ | | | | | | Use a big-enough buffer in path_cli.c to avoid a compiler warning (with gcc 9, at least) Signed-off-by: Mark Stapp <mjs@voltanet.io>
* pathd: un-guard clippy filesGalaxyGorilla2020-12-191-5/+0
| | | | | | | | | The relevant clippy machinery in python/makevars.py assumes to get 'raw' Makefile text containing all `clippy_scan` variables. If those files in the `clippy_scan` variable are later on used in the compilation process does not matter. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
* pathd: Add optional support for PCEP to pathdSebastien Merle2020-12-1820-3/+9624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new dynamic module makes pathd behave as a PCC for dynamic candidate path using the external library pcpelib https://github.com/volta-networks/pceplib . The candidate paths defined as dynamic will trigger computation requests to the configured PCE, and the PCE response will be used to update the policy. It supports multiple PCE. The one with smaller precedence will be elected as the master PCE, and only if the connection repeatedly fails, the PCC will switch to another PCE. Example of configuration: segment-routing traffic-eng pcep pce-config CONF source-address ip 10.10.10.10 sr-draft07 ! pce PCE1 config CONF address ip 1.1.1.1 ! pce PCE2 config CONF address ip 2.2.2.2 ! pcc peer PCE1 precedence 10 peer PCE2 precedence 20 ! ! ! ! Co-authored-by: Brady Johnson <brady@voltanet.io> Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io> Co-authored-by: GalaxyGorilla <sascha@netdef.org> Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Co-authored-by: Renato Westphal <renato@opensourcerouting.org> Co-authored-by: Sebastien Merle <sebastien@netdef.org> Signed-off-by: Sebastien Merle <sebastien@netdef.org>
* pathd: New SR-TE policy management daemonSebastien Merle2020-12-1820-0/+4914
This new daemon manages Segment-Routing Traffic-Engineering (SR-TE) Policies and installs them into zebra. It provides the usual yang support and vtysh commands to define or change SR-TE Policies. In a nutshell SR-TE Policies provide the possibility to steer traffic through a (possibly dynamic) list of Segment Routing segments to the endpoint of the policy. This list of segments is part of a Candidate Path which again belongs to the SR-TE Policy. SR-TE Policies are uniquely identified by their color and endpoint. The color can be used to e.g. match BGP communities on incoming traffic. There can be multiple Candidate Paths for a single policy, the active Candidate Path is chosen according to certain conditions of which the most important is its preference. Candidate Paths can be explicit (fixed list of segments) or dynamic (list of segment comes from e.g. PCEP, see below). Configuration example: segment-routing traffic-eng segment-list SL index 10 mpls label 1111 index 20 mpls label 2222 ! policy color 4 endpoint 10.10.10.4 name POL4 binding-sid 104 candidate-path preference 100 name exp explicit segment-list SL candidate-path preference 200 name dyn dynamic ! ! ! There is an important connection between dynamic Candidate Paths and the overall topic of Path Computation. Later on for pathd a dynamic module will be introduced that is capable of communicating via the PCEP protocol with a PCE (Path Computation Element) which again is capable of calculating paths according to its local TED (Traffic Engineering Database). This dynamic module will be able to inject the mentioned dynamic Candidate Paths into pathd based on calculated paths from a PCE. https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06 Co-authored-by: Sebastien Merle <sebastien@netdef.org> Co-authored-by: Renato Westphal <renato@opensourcerouting.org> Co-authored-by: GalaxyGorilla <sascha@netdef.org> Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io> Signed-off-by: Sebastien Merle <sebastien@netdef.org>