summaryrefslogtreecommitdiffstats
path: root/ldpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ldpd: guard the label allocation debug messagesRenato Westphal2017-09-125-5/+26
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: fix broken label allocationRenato Westphal2017-09-121-1/+2
| | | | | | | | | Once ldpd allocated label 48 for a given FEC, all subsequent requests for a new label would return the same value (48). The problem is that we were left shifting an uint32_t value up to 64 times, losing important information. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use zapi_route to send/receive redistributed routes as wellRenato Westphal2017-08-241-70/+36
| | | | | | | | | | | | | | | | | | Some differences compared to the old API: * Now the redistributed routes are sent using address-family independent messages (ZEBRA_REDISTRIBUTE_ROUTE_ADD and ZEBRA_REDISTRIBUTE_ROUTE_DEL). This allows us to unify the ipv4/ipv6 zclient callbacks in the client daemons and thus remove a lot of duplicate code; * Now zebra sends all nexthops of the redistributed routes to the client daemons, not only the first one. This shouldn't have any noticeable performance implications and will allow us to remove an ugly exception we had for ldpd (which needs to know all nexthops of the redistributed routes). The other client daemons can simply ignore the nexthops if they want or consult just the first one (e.g. ospfd/ospf6d/ripd/ripngd). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* babeld/eigrpd/ldpd/nhrpd: add prefix length sanity checksRenato Westphal2017-08-231-1/+2
| | | | | | Pulled from d917882. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #939 from jbonor/optimizationLou Berger2017-08-224-4/+4
|\ | | | | Optimization
| * lib: standardize use of queue.hJorge Boncompte2017-08-174-4/+4
| | | | | | | | | | | | | | | | The simple queue implementation in OpenBSD and FreeBSD are called diferently, standardize in the use of the FreeBSD version and map the missing names only if we compile on OpenBSD. Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
* | Merge pull request #1009 from donaldsharp/show_cmdsDavid Lamparter2017-08-211-7/+7
|\ \ | | | | | | Show cmds
| * | *: Add 'show debugging' command from vtyshDonald Sharp2017-08-211-7/+7
| |/ | | | | | | | | | | | | Allow vtysh to query every daemon about its debugging status in one go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* / *: centralize some exit cleanup into libfrrDavid Lamparter2017-08-151-5/+3
|/ | | | | | | | Start creating a counterpart to frr_init and frr_late_init. Unfortunately, some daemons don't do any exit handling, this doesn't change that just yet. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge branch 'frr/pull/822' ("EVPN fixes")David Lamparter2017-08-091-8/+10
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ldpd: Use JSON_STRDonald Sharp2017-08-081-8/+10
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge remote-tracking branch 'frr/master' into tcp-zebraDavid Lamparter2017-08-0914-109/+286
|\ \
| * \ Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp2017-08-094-31/+66
| |\ \ | | | | | | | | more non-recursive build, fix cross-compile, & doc build mangling
| | * | build: non-recursive ldpdDavid Lamparter2017-08-044-31/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a build problem where using #include "ldpd/ldp_vty_cmds_clippy.c" results in the Makefile dependency tracking having both ldp_vty_cmds.c: ldp_vty_cmds_clippy.c ldp_vty_cmds.c: ../ldpd/ldp_vty_cmds_clippy.c (because, if it's included as "ldpd/..", it uses the "-I.." include path in gcc, so the gcc -MD dependency output is "../ldpd/...") ... all of which causes the build to try to build it twice (at the same time) and fail rather stupidly. With a non-recursive build, the two paths are identical and everything just works. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | Merge pull request #892 from opensourcerouting/watchfrr-simplifyDonald Sharp2017-08-092-0/+2
| |\ \ \ | | | | | | | | | | simplify watchfrr, add --terminal, improve startup logging
| | * | | lib: privs: make uid/gid accessible before setuidDavid Lamparter2017-08-022-0/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits off privs_preinit(), which does the lookups for user and group IDs. This is so the init code can create state directories while still running as root. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | zebra: fix pseudowire code re. upstream changesDavid Lamparter2017-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - VTY_NEWLINE is out - thread API changed with the extra arg - struct rib got renamed to struct route_entry - MPLS_NO_LABEL was removed - RB-tree implementation has some extra args Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | ldpd: fix missing label mappingsRenato Westphal2017-08-092-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some scenarios, it's possible to send a Label Withdraw to a neighbor and not receive a corresponding Label Release right away. This can happen during reconvergence after a network failure or configuration change. When this happens, the list of upstream mappings of a given FEC might not be empty even after sending a Label Withdraw to all neighbors. This situation holds until all neighbors either send a Label Release or are torn down (e.g. keepalive timeout). With that said, we shouldn't check for 'RB_EMPTY(&fn->upstream)' in lde_kernel_update() because it can prevent ldpd from sending label mappings in such circumstances. This check was introduced to avoid sending the same label mapping more than once to the same neighbor, but we need to remove this optimization for now until we find a better solution (which probably involves refactoring the whole zebra<->ldpd communication). While here, add a new debug message in lde_send_labelmapping() which can aid in troubleshooting label problems in the future. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | ldpd: integrate with the pseudowire manager in zebraRenato Westphal2017-08-097-72/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we receive a notification from zebra indicating that the installation of a pseudowire has failed (e.g. no reachability), send a PW Status notification to the remote peer (or a Label Withdraw if the remote peer doesn't support the PW Status TLV). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | zebra: add pseudowire managerßingen2017-08-092-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Base framework for supporting MPLS pseudowires in FRR. A consistent zserv interface is provided so that any client daemon (e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard way. Static pseudowires can also be implemented by using the same interface. When zebra receives a request to install a pseudowire and the installation in the kernel or hardware fails, a notification is sent back to the client daemon and a new install attempt is made every 60 seconds (until it succeeds). Support for external dataplanes is provided by the use of hooks to install/uninstall pseudowires. Signed-off-by: ßingen <bingen@voltanet.io> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | ldpd: fix bug with dual-stack neighborsRenato Westphal2017-08-091-0/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were assuming that a neighbor can be deleted only when all of its adjacencies are dead. This is not the case for dual-stack neighbors. If the transport-preference is IPv4 and all adjacencies are IPv6 (or vice-versa), then it should be deleted and everything cleaned-up accordingly. Bug exposed by the new RB tree implementation on master, but the fix also applies to stable/3.0. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* / | *: remove --enable-tcp-zebra, rework ZAPI pathDavid Lamparter2017-08-082-2/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds "@tcp" as new choice on the -z option present in zebra and the protocol daemons. The --enable-tcp-zebra option on configure is no longer needed, both UNIX and TCP socket support is always available. Note that @tcp should not be used by default (e.g. in an init script), and --enable-tcp-zebra should never have been in any distro package builds, because **** TCP-ZEBRA IS A SECURITY PROBLEM **** It allows arbitrary local users to mess with the routing table and inject bogus data -- and also ZAPI is not designed to be robust against attacks. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | ldpd: use NO_STRQuentin Young2017-08-071-37/+37
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | ldpd: Switch to using ETH_ALENDonald Sharp2017-08-043-6/+6
|/ | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ldpd: update .gitignoreRenato Westphal2017-07-311-0/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: silence coverity scan warningRenato Westphal2017-07-311-1/+5
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: add auto-complete for l2vpnsRenato Westphal2017-07-311-2/+24
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: convert CLI code to use DEFPYRenato Westphal2017-07-316-736/+276
| | | | | | Yay :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: restore correct defaults on "no discovery ... interval"Renato Westphal2017-07-311-2/+3
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: fix missing "no" commands in vtyshRenato Westphal2017-07-311-29/+87
| | | | | | | Split the "no" version of some commands into a different DEFUN so that DEFUN_NOSH doesn't apply to them. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: fix segfault in "clear mpls ldp neighbor [addr]"Renato Westphal2017-07-311-2/+3
| | | | | | Bug introduced by the CLI refactoring (c740f7d3678). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: add the exit-address-family commandRenato Westphal2017-07-272-1/+13
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-142-14/+14
|\ | | | | | | | | | | Lots of conflicts from CMD_WARNING_CONFIG_FAILED... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * vtysh: return non-zero for configuration failuresDaniel Walton2017-07-132-14/+14
| | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This allows frr-reload.py (or anything else that scripts via vtysh) to know if the vtysh command worked or hit an error.
* | *: remove VTYNL, part 6 of 6David Lamparter2017-07-141-29/+27
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 3 of 6David Lamparter2017-07-141-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 1 of 6David Lamparter2017-07-143-16/+16
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 2 of 2David Lamparter2017-07-143-22/+22
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-133-137/+137
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: more `show thread cpu`Quentin Young2017-06-302-2/+2
| | | | | | | Add support for naming pthreads. Also, note that we don't have any records yet if that's the case. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: vty_outln (vty, "") --> vty_out (vty, VTYNL)Quentin Young2017-06-293-16/+16
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: s/VTY_NEWLINE/VTYNL/gQuentin Young2017-06-291-17/+17
| | | | | | Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-293-265/+232
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge remote-tracking branch 'origin/stable/3.0'Donald Sharp2017-06-292-21/+18
|\
| * ldpd: fix issues with dual-stack adjacenciesRenato Westphal2017-06-132-21/+18
| | | | | | | | | | | | | | | | Handling configuration changes from single-stack mode to dual-stack mode (and vice-versa) is tricky. This patch attempts to solve all issues that might happen on such circumstances. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | Merge pull request #730 from opensourcerouting/rbtree-improvementDonald Sharp2017-06-1910-91/+99
|\ \ | | | | | | RB tree improvement
| * | ldpd: fix fallouts from the rb-tree conversionRenato Westphal2017-06-163-5/+5
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@openbsd.org>
| * | lib: improve the RB implementationRafael Zalamena2017-06-169-89/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the RB tree implementation completely to the new dlg@'s version that uses pre-declared functions instead of macros for tree functions. Original e-mail/diff: https://marc.info/?l=openbsd-tech&m=147087487111068&w=2 Pros: * Reduces the amount of code that the usage of those macros generate * Allows the compiler to do a better compile-time check job * Might have better i-cache utilization since the tree code is shared Con: * dlg@ benchmarks shows it has 'very slightly slower' insertions * imported RB_* code must adapt the following calls: RB_INIT(), RB_GENERATE(), RB_ROOT(), RB_EMPTY(), make compare functions use 'const' (if not already) and maybe others.
* | | ldpd: update copyright informationRenato Westphal2017-06-167-70/+63
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | ldpd: convert cli and get rid of the xml interfaceRenato Westphal2017-06-168-770/+1241
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The xml2cli.pl script was useful years ago when the vty code was very rudimentary. This is not the case anymore, so convert all ldpd CLI commands to use DEFUNs directly and get rid of the XML interface. The benefits are: * Consistency with the other daemons; * One less build dependency (the LibXML perl module); * Easier to add new commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>