summaryrefslogtreecommitdiff
path: root/pathd
AgeCommit message (Collapse)Author
2021-06-01pathd: fix render candidate-path bandwidthEmanuele Di Pascale
the config for dynamic candidate paths with bandwidth preferences was using a different order of keywords (required bandwidth X) than the corresponding command (bandwidth X required). This confuses frr-reload, and possibly users too. Make both use the same order. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-05-19Merge pull request #8665 from volta-networks/fix_pathd_coverityOlivier Dugeon
pathd: Clean coverity issues after merge pathd link state feature.
2021-05-19Merge pull request #8667 from volta-networks/fix_pathd_cli_affinityOlivier Dugeon
pathd: Fix affinity command to exclude options to match implementation.
2021-05-18pathd: Clean coverity issues after merge pathd link state feature.Javier Garcia
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-18pathd: Fix affinity command to exclude options to match implementation.Javier Garcia
Including documentation update. Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-13lib: adapt to version 2 of libyangChristian Hopps
Compile with v2.0.0 tag of `libyang2` branch of: https://github.com/CESNET/libyang staticd init load time of 10k routes now 6s vs ly1 time of 150s Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-10pathd. TED support . Validation of candidate path - [part 2/4]Javier Garcia
- Explicit segment list nai will be resolved to corresponded sid. - Dynamic segment list (from pce) will be validated. - If segment list could not be resolved or validated won't be used. - Now this new config is supported segment-list sl-1 index 10 nai prefix 10.1.2.1/32 iface 1 index 30 nai adjacency 10.2.5.2 10.2.5.5 index 40 nai prefix 10.10.10.5/32 algorithm 0 Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-10pathd. TED support . Client to link State - [part 1/4]Javier Garcia
- pathd will act as a client to for the configured igp. - pathd must be configured to activate and receive data from igp. !pathd config snippet segment-routing traffic-eng mpls-te on mpls-te import ospfv2 Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-03Merge pull request #8545 from opensourcerouting/assert-our-ownMark Stapp
*: make our own assert() actually work
2021-04-23*: make sure `config.h` or `zebra.h` is firstDavid Lamparter
`config.h` has all the defines from autoconf, which may include things that switch behavior of other included headers (e.g. _GNU_SOURCE enabling prototypes for additional functions.) So, the first include in any `.c` file must be either `config.h` (with the appropriate guard) or `zebra.h` (which includes `config.h` first thing.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-22pathd: don't init PCEP before fork()David Lamparter
Turns out the PCEP stuff does not work particularly well if its threads are ... missing. Who would've thought? Reported-by: Erik Kooistra <me@erikkooistra.nl> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21build: properly split CFLAGS from AC_CFLAGSDavid Lamparter
`CFLAGS` is a "user variable", not intended to be controlled by configure itself. Let's put all the "important" stuff in AC_CFLAGS and only leave debug/optimization controls in CFLAGS. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21build: make builddir include path consistentDavid Lamparter
... 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>
2021-04-13build: don't use $(top_srcdir) in vtysh_scanDavid Lamparter
It's not necessary and can confuse scripts. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-13Merge pull request #8100 from qlyoung/remove-sample-conf-filesDavid Lamparter
2021-04-12Merge pull request #8421 from opensourcerouting/xrelfo-armMark Stapp
fix xrelfo on ARM(32) & cross-compile
2021-04-09build: don't link pathd/path_main.c twiceDavid Lamparter
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>
2021-04-09*: remove *.conf.sample filesQuentin Young
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>
2021-04-09lib: use platform-neutral value for TCP MD5 signature lenMark Stapp
Use a pcep-specific value for MD5SIG_MAXLEN, use the OS value if present. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-24Merge pull request #8250 from idryzhov/fix-nb-running-get-entryRenato Westphal
Fix aborts when using nb_running_get_entry during validation stage
2021-03-23Merge pull request #8307 from opensourcerouting/mtypes-cleanup-20210322Russ White
isisd, eigrpd, pathd: clean up & drop *_memory.[ch] files, make a whole bunch static
2021-03-22pathd: kill *_memory.[ch]David Lamparter
Ouch, MTYPE_PCEP is used in 81 places :( Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22Merge pull request #8303 from volta-networks/fix_coverity_pceplibDonald Sharp
pceplib: Fixing coverity messages.
2021-03-22Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis
*: require ISO C11 + semicolons after file-scope macros
2021-03-20pceplib: Fixing coverity messages.Javier Garcia
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-03-17pathd: remove mid-string line breaksDavid Lamparter
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>
2021-03-17pathd: use %pIA to print struct ipaddr *David Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17pathd: fix %pI4 <> %pI6 snafuDavid Lamparter
... as noted by the frr-format GCC plugin. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after FRR_DAEMON_INFO & co.David Lamparter
... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_HOOK & co.David Lamparter
See previous commit. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_MTYPE & coDavid Lamparter
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>
2021-03-16*: fix aborts when validating configurationIgor Ryzhov
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>
2021-03-05pceplib: Integrate pcelib into frrJavier Garcia
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>
2021-01-19pathd: add meaningful names to threadsJavier Garcia
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-01-11Merge pull request #7830 from volta-networks/misc_fixes_2021Donatas Abraitis
Misc fixes (bgpd, pathd, tools)
2021-01-09Merge pull request #7785 from volta-networks/fix_show_pce_confidence_for_prDonald Sharp
Add level of confidence to show pcep-session
2021-01-09pathd, tools: fix peer preference configEmanuele Di Pascale
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>
2021-01-05pathd: Convert to use our internal frr_weak_randomDonald Sharp
rand() should not be used, we should be using the frr_weak_random() call instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-04pathd: Fix unlock of non-locked mutexDonald Sharp
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>
2020-12-22pathd: Add level of confidence to show pcep-sessionJavier Garcia
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>
2020-12-21pathd: fix compile warning in path_cliMark Stapp
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>
2020-12-19pathd: un-guard clippy filesGalaxyGorilla
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>
2020-12-18pathd: Add optional support for PCEP to pathdSebastien Merle
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>
2020-12-18pathd: New SR-TE policy management daemonSebastien Merle
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>