summaryrefslogtreecommitdiffstats
path: root/ldpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ldpd and Zebra: Expand existing debug commands.lynne2020-05-115-4/+48
| | | | | | | | | | | | L2VPN PW are very hard to determine why they do not come up. The following fixes expand the existing show commands in ldp and zebra to display a reason why the PW is in the DOWN state and also display the labeled nexthop route selected to reach the PW peer. By adding this information it will provide the user some guidance on how to debug the PW issue. Also fixed an assert if labels were changed for a PW that is between directly connected peers. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
* Merge pull request #6352 from volta-networks/fix_ldp_dscpRenato Westphal2020-05-061-0/+10
|\ | | | | ldpd: LDP does not always send traffic with correct DSCP value.
| * ldpd: LDP does not always send traffic with correct DSCP value.Karen Schoener2020-05-061-0/+10
| | | | | | | | | | | | | | Adding code so that the LDP neighbor that does not initiate the TCP connection also sets the DSCP (via setsocketopt). Signed-off-by: Karen Schoener <karen@voltanet.io>
* | build: don't link ldpd.c twiceDavid Lamparter2020-05-051-1/+0
|/ | | | | | ... this breaks LLVM bitcode linking. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #6241 from volta-networks/fix_ldp_aclRenato Westphal2020-04-306-8/+401
|\ | | | | ldpd: fix ACL rule modification
| * ldpd: fix ACL rule modificationlynne2020-04-296-8/+401
| | | | | | | | | | | | | | | | | | | | | | Changes to ACL rules were not applied to LDP. This fix allows LDP to be notified when a rule in an ACL filter is modified by the user. The filter is properly applied to the LDP session. The filter may cause a LDP session to go down/up or to remove/add labels being advertised/received from a neighbor. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
* | build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-2/+3
| | | | | | | | | | | | | | These are easy to get subtly wrong, and doing so can cause nondeterministic failures when racing in parallel builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | build: use VPATH for vtysh_scanDavid Lamparter2020-04-271-1/+1
| | | | | | | | | | | | No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #6274 from mjstapp/fix_lde_blocking_sleepOlivier Dugeon2020-04-242-14/+40
|\ \ | | | | | | ldpd: use a timer instead of sleeping in LM init
| * | ldpd: use a timer instead of sleeping in LM initMark Stapp2020-04-232-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop sleeping if synchronous label-manager zapi session has trouble during init: retry using a timer instead. Move initial label-block request to a point where the LM zapi session is known to be running. Remove the use of the daemon 'instance' - we're using the session_id to distinguish the LM zapi session. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | Merge pull request #6262 from qlyoung/remove-sprintfDavid Lamparter2020-04-231-2/+4
|\ \ \ | |/ / |/| |
| * | *: sprintf -> snprintfQuentin Young2020-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | Merge pull request #6147 from opensourcerouting/ldpd-broken-lspsRuss White2020-04-211-16/+26
|\ \ \ | |/ / |/| | ldpd: don't drop packets coming through a broken LSP
| * | ldpd: don't drop packets coming through a broken LSPRenato Westphal2020-04-081-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Independent Control mode is in use (the default one), each LDP speaker allocates labels independently, which can lead to broken LSPs when the LDP and IGP domains are not congruent. What we were doing in this case was to drop all packets coming through a broken LSP, which causes drastic side effects in the network like loss of IP connectivity between routers. We can however do a best-effort attempt to avoid packet loss by popping the top-level label of the incoming packets and forwarding them normally to their nexthops. This will be enough to guarantee that labeled IP packets will reach their final destination. The broken LSPs will still be unsuitable to tunnel labeled traffic, like VPN packets, but in this case there's nothing we can do about it. Cisco's IOS does something similar, called the "Untagged/No Label" operation, which removes the entire label stack and forward the packet unlabeled. We don't have such functionality available in the Linux kernel, but this shouldn't make any difference for practical purposes. Fixes #6127. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | Merge pull request #6247 from FRRouting/nb_conversionsDonald Sharp2020-04-171-0/+1
|\ \ \ | | | | | | | | Merge nb_converions branch to master
| * | | *: include vrf northbound module in initChirag Shah2020-04-161-0/+1
| | |/ | |/| | | | | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | Merge pull request #6135 from opensourcerouting/cli-node-cleanupDonald Sharp2020-04-174-54/+57
|\ \ \ | | | | | | | | *: clean up the mess that is CLI command nodes
| * | | *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-162-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | *: move CLI parent data to cmd_node->parent_nodeDavid Lamparter2020-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | *: remove second parameter on install_node()David Lamparter2020-04-164-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | *: remove cmd_node->vtyshDavid Lamparter2020-04-162-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | *: clean up cmd_node initializersDavid Lamparter2020-04-162-40/+32
| |/ / | | | | | | | | | | | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* | | Merge pull request #6224 from mjstapp/zclient_session_idOlivier Dugeon2020-04-161-0/+1
|\ \ \ | | | | | | | | lib,zebra: add a session id for zapi sessions
| * | | zebra,ldpd: use zapi client session id in LM apisMark Stapp2020-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the zapi client session id in the label manager apis; use the client struct directly in some code. Assign a session id to ldpd's sync LM zapi session. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | | Merge pull request #5451 from opensourcerouting/rcu-logSantosh P K2020-04-162-5/+15
|\ \ \ \ | |_|/ / |/| | | logging subsystem rewrite
| * | | lib: rewrite zlog lock-free & TLS-bufferedDavid Lamparter2020-04-012-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a full rewrite of the "back end" logging code. It now uses a lock-free list to iterate over logging targets, and the targets themselves are as lock-free as possible. (syslog() may have a hidden internal mutex in the C library; the file/fd targets use a single write() call which should ensure atomicity kernel-side.) Note that some functionality is lost in this patch: - Solaris printstack() backtraces are ditched (unlikely to come back) - the `log-filter` machinery is gone (re-added in followup commit) - `terminal monitor` is temporarily stubbed out. The old code had a race condition with VTYs going away. It'll likely come back rewritten and with vtysh support. - The `zebra_ext_log` hook is gone. Instead, it's now much easier to add a "proper" logging target. v2: TLS buffer to get some actual performance Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | ldpd: ldp_vty_neighbor_password(): fix auth.md5key_len calculationG. Paul Ziemba2020-04-151-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Per issue #6202 Very long passwords (>79 chars) get truncated: save truncated length in nbrp->auth.md5key_len instead of original length. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
* | | *: Do not cast to the same typeDonatas Abraitis2020-04-081-1/+1
| |/ |/| | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | Merge pull request #6109 from volta-networks/feat_ldp_host_onlyRenato Westphal2020-04-023-0/+64
|\ \ | |/ |/| ldpd: host only filter
| * ldpd: fixing host-only configuration filter.lynne2020-04-013-0/+64
| | | | | | | | | | | | | | | | | | | | | | There is configuration in LDP to only create labels for host-routes. If the user remove this configuration the code was not readvertising non-host routes to it's LDP neighbors. The issue is the same in reverse also. If the user adds this configuration on an active LDP session the non-host routes were not withdrawn. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
* | Merge pull request #5925 from volta-networks/synchronous_clientRenato Westphal2020-03-261-1/+10
|\ \ | |/ |/| zebra: synchronous client queues accumulate messages from zebra
| * zebra: Synchronous client queues accumulate messages from zebra.Karen Schoener2020-03-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zebra is currently sending messages on interface add/delete/update, VRF add/delete, and interface address change - regardless of whether its clients had requested them. This is problematic for lde and isis, which only listens to label chunk messages, and only when it is waiting for one (synchronous client). The effect is the that messages accumulate on the lde synchronous message queue. With this change: - Zebra does not send unsolicited messages to synchronous clients. - Synchronous clients send a ZEBRA_HELLO to zebra. The ZEBRA_HELLO contains a new boolean field: sychronous. - LDP and PIM have been updated to send a ZEBRA_HELLO for their synchronous clients. Signed-off-by: Karen Schoener <karen@voltanet.io>
* | Merge pull request #5851 from volta-networks/feat_ldp_oc_reviewRenato Westphal2020-03-238-13/+207
|\ \ | | | | | | ldpd: adding support for LDP ordered label distribution control
| * | ldpd: adding support for LDP ordered label distribution controlKaren Schoener2020-03-208-13/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDP ordered label distribution control only binds a label to a FEC if it is the egress LSR, or the router received a label binding for a FEC from the next hop router. In this mode, an MPLS router will create a label binding for each FEC and distribute it to its neighbors so long as he has a entry in the RIB for the destination. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
* | | ldpd: During code inspection we are mixing data sizesDonald Sharp2020-03-117-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I understand it ldpd was originally developed as a standalone daemon for *BSD land. Then ported to FRR. FRR uses ifindex_t as the base type for the ifindex. Mixing `unsigned short` and `int` and `unsigned int` is going to lead to fun somewhere along the way. Especially when we get to run on a system with ifindex churn( I'm looking at you docker ). Attempt to convert all of ldpd to think of the ifindex as a `ifindex_t`. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ldpd: remove multiple definitions of thread_masterRuben Kerkhof2020-03-082-6/+0
| | | | | | | | | | | | | | | | | | This fixes the last issue compiling FRR with GCC 10 on Fedora Rawhide. Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* | | ldpd: fix another linking issue with GCC-10Ruben Kerkhof2020-03-082-1/+3
| | | | | | | | | | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* | | ldpd: Fix linking error on Fedora Rawhide with GCC 10Ruben Kerkhof2020-03-082-1/+3
| |/ |/| | | | | | | | | | | | | | | | | | | GCC 10 switched to -fno-common by default, see https://gcc.gnu.org/gcc-10/porting_to.html#common for details. Fixes: CCLD ldpd/ldpd /usr/bin/ld: ldpd/libldp.a(adjacency.o):/home/ruben/src/frr/ldpd/ldpe.h:294: multiple definition of `pkt_ptr'; ldpd/ldpd.o:/home/ruben/src/frr/ldpd/ldpe.h:294: first defined here Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* | ldpd: Remove double set of lifDonald Sharp2020-03-031-1/+1
| | | | | | | | | | | | | | | | The lif variable was being set in the if statement and immediately copied into from xf. No need to do this twice. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | ldpd: Cleanup indentation in merge_nbrpsDonald Sharp2020-02-271-21/+23
| | | | | | | | | | | | | | We had a very deeply nested function, reduce the indentation for easier reading. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | ldpd: Cleanup set but unused variablesDonald Sharp2020-02-273-12/+11
|/ | | | | | There existed some variables set but never used. Clean this up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: encode zapi labels message using nexthopsMark Stapp2020-02-141-6/+5
| | | | | | | | Use the zapi_nexthop struct with the mpls_labels zapi messages instead of the special-purpose (and more limited) nexthop struct that was being used. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: Replace s_addr 0 => INADDR_ANYDonatas Abraitis2020-02-061-3/+2
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: generously apply constDavid Lamparter2019-12-022-2/+2
| | | | | | const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: make frr_yang_module_info constDavid Lamparter2019-11-301-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* ldpd: add missing sanity check in the parsing of label messagesRenato Westphal2019-11-141-0/+8
| | | | | | | | Validate that the FEC prefix length is within the allowed limit (depending on the FEC address family) in order to prevent possible buffer overflows. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Convert connected_free to a double pointerDonald Sharp2019-11-021-1/+1
| | | | | | Set the connected pointer to set the pointer to NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-191-18/+1
| | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert interface_down to interface down callbackDonald Sharp2019-09-191-23/+6
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>