summaryrefslogtreecommitdiffstats
path: root/ldpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-1/+1
| | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* ldpd: fix corner case in which we wouldn't respect the max pdu lengthRenato Westphal2019-01-221-2/+2
| | | | | | | | | The calculation to know when an LDP PDU went past the maximum negotiated PDU length was wrong because it wasn't taking the "Version" and "PDU Length" fields into account (total of four bytes). Fix this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: fix missing return value in bindanyMark Stapp2019-01-161-0/+1
| | | | | | | One of the socket utilities was missing a return value in one of its ifdef'd paths. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ldpd: fix startup on OpenBSDRafael Zalamena2018-12-221-8/+10
| | | | | | | We must open the PF_KEY socket before dropping privileges, otherwise the socket creation will fail with permission problems. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* ldpd: add support for FreeBSD IP_BINDANYRafael Zalamena2018-12-211-2/+11
| | | | | | | Add yet another way to setsockopt a socket to listen to a foreign address. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* *: remove the configuration lock from all daemonsRenato Westphal2018-11-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | A while ago all FRR configuration commands were converted to use the QOBJ infrastructure to keep track of configuration objects. This means the configuration lock isn't necessary anymore because the QOBJ code detects when someones tries to edit a configuration object that was deleted and react accordingly (log an error and abort the command). The possibility of accessing dangling pointers doesn't exist anymore since vty->index was removed. Summary of the changes: * remove the configuration lock and the vty_config_lockless() function. * rename vty_config_unlock() to vty_config_exit() since we need to clean up a few things when exiting from the configuration mode. * rename vty_config_lock() to vty_config_enter() to remove code duplication that existed between the three different "configuration" commands (terminal, private and exclusive). Configuration commands converted to the new northbound model don't need the configuration lock either since the northbound API also detects when someone tries to edit a configuration object that doesn't exist anymore. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Replace zclient_new with zclient_new_notifyDonald Sharp2018-11-122-2/+2
| | | | | | | It's been a year since we added the new optional parameters to instantiation. Let's switch over to the new name. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: add empty array of YANG modulesRenato Westphal2018-10-271-0/+6
| | | | | | | | | | FRR_DAEMON_INFO should now contain an array of 'frr_yang_module_info' structures describing the YANG modules implemented by the daemon. This array will be used by frr_init() function to load all YANG modules and initialize the northbound callbacks during the daemon initialization. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: introduce new northbound APIRenato Westphal2018-10-271-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: spelchekDavid Lamparter2018-10-252-2/+2
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd, doc, ldpd, lib, tests, zebra: LM fixespaco2018-09-181-1/+1
| | | | | | | | | | | | | Corrections so that the BGP daemon can work with the label manager properly through a label-manager proxy. Details: - Correction so the BGP daemon behind a proxy label manager gets the range correctly (-I added to the BGP daemon, to set the daemon instance id) - For the BGP case, added an asynchronous label manager connect command so the labels get recycled in case of a BGP daemon reconnection. With this, BGPd and LDPd would behave similarly. Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #3040 from pacovn/static_analysis__drop_const_1Quentin Young2018-09-173-7/+7
|\ | | | | bgpd isisd ldpd lib: const drop fixes (SA)
| * bgpd isisd ldpd lib: const drop fixes (SA)F. Aragon2018-09-173-7/+7
| | | | | | | | | | | | Can be detected with e.g. ./configure CFLAGS=-Wcast-qual CC=clang Signed-off-by: F. Aragon <paco@voltanet.io>
* | *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-131-1/+1
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #2977 from opensourcerouting/doc-fixDonald Sharp2018-09-091-1/+1
|\ | | | | build: fix not building docs w/o sphinx
| * build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | | | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* | Merge pull request #2965 from opensourcerouting/buildfoo-20180904Donald Sharp2018-09-091-0/+4
|\ \ | |/ |/| more build fixes & warning-free build
| * *: fix config.h/zebra.h include orderDavid Lamparter2018-09-081-0/+4
| | | | | | | | | | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
* | Merge pull request #2862 from opensourcerouting/non-recursiveDonald Sharp2018-09-092-15/+2
|\| | | | | final non-recursive make
| * *: cleanup .gitignore filesDavid Lamparter2018-09-081-15/+0
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
| * build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+2
| | | | | | | | | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* | lib, ldpd: fix SA warnings from TAILQ oddnessDavid Lamparter2018-09-081-3/+1
|/ | | | | | | Add a TAILQ_POP_FIRST so Clang understands it's the same item that is getting removed from the list. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+1
| | | | | | | | The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* *: use frr_elevate_privs() (2/2: manual)David Lamparter2018-08-141-26/+14
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: use frr_elevate_privs() (1/2: coccinelle)David Lamparter2018-08-141-10/+6
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: rename ferr_zlog -> flog_err_sysQuentin Young2018-08-141-3/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-141-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* ldpd: Convert to using LIB_ERR_XXX and zlog_ferrDonald Sharp2018-08-141-2/+4
| | | | | | | convert ldpd over to using zlog_ferr and LIB_ERR_XXX where appropriate. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ldpd: use DEFPY_NOSH whenever possibleRenato Westphal2018-08-131-39/+15
| | | | | | | | | All ldpd commands were written using DEFPY except the ones that needed to be ignored by vtysh, in which case we were using DEFUN_NOSH. Now that DEFPY_NOSH is available, convert the remaining commands for consistency and to simplify the code a little bit. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: add missing command under the ipv6 address-family nodeRenato Westphal2018-07-241-0/+1
| | | | | | Bug found by Patrick Velder. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: buffer underflow, thread safety (PVS-Studio)F. Aragon2018-07-046-51/+46
| | | | | | | | | | This commit fixes two issues: - memcpy() using containers of different sizes when using addr2sa(), mixing 'struct sockaddr_storage' and 'union sockunion'. - addr2sa() function not being thread safe (using a local static variable as container. Signed-off-by: F. Aragon <paco@voltanet.io>
* ldpd: null check (Coverity 1452317)paco2018-06-251-0/+3
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2449 from donaldsharp/lib_delayed_readLou Berger2018-06-221-1/+18
|\ | | | | Lib delayed read
| * ldpd: Schedule application of config till after read-inDonald Sharp2018-06-191-1/+18
| | | | | | | | | | | | | | | | | | | | | | With commit e94b38d94b5 we are now scheduling the read of vty config until after the startup of main thread processing. It now becomes necessary to move the application of the config until after the read in of the config from a file if we are using a non-integrated config. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | ldpd lib: null check (Coverity 1452287 + 20 alike)paco2018-06-212-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Coverity issues fixed with this commit: 1452287 1452291 1452307 1452310 1452317 1452321 1452327 1452330 1452331 1452336 1452337 1452340 1452352 1452354 1452358 (originated at ldpd/ldpd_vty_cmds_clippy.c) 1448388 1448390 1448392 1448397 1448404 1448408 (originated at lib/plist_clippy.c) Signed-off-by: F. Aragon <paco@voltanet.io>
* | Merge pull request #2485 from pacovn/cppcheck_ldpd_redundant_conditionRuss White2018-06-201-7/+23
|\ \ | |/ |/| ldpd: redundant condition (cppcheck)
| * ldpd: redundant condition (cppcheck)paco2018-06-181-7/+23
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | ldpd: redundant pointer operation (cppcheck)paco2018-06-181-1/+1
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-273-6/+5
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: globally ignore clippy-generated sourceQuentin Young2018-03-091-1/+0
| | | | | | Tired of dealing with this Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: Make assignment from RB_ROOT in while loop work betterDonald Sharp2018-02-238-25/+65
| | | | | | | Fix up the assignment of the variable = RB_ROOT inside of while loop patter we were using. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Make code use a consisten definition of labelsDonald Sharp2018-02-093-17/+21
| | | | | | | | | | Turns out we had 3 different ways to define labels all of them overlapping with the same meanings. Consolidate to 1. This one choosen is consistent naming wise with what the *bsd and linux kernels use. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ldpd: Switch over to new debug styleDonald Sharp2017-12-082-57/+57
| | | | | | | | | | | When compiling ldpd on a mac, there exists a #define MSG_SEND which conflicts with a define in ldp_debug.h. During discussion about this we decided that it would be better to remove the macro massaging that was going on and to just call our own #define for it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: make clippy usage more consistentRenato Westphal2017-12-041-0/+1
| | | | | | Fixes #1511. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: improve processing of redistributed routesRenato Westphal2017-11-291-6/+26
| | | | | | | ldpd should ignore blackhole routes and any other route that doesn't have a nexthop address (connected routes being an exception). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ldpd: add a few warning messages to aid in troubleshootingRenato Westphal2017-11-291-3/+12
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra, ldpd: fix display of pseudowire statusRenato Westphal2017-11-293-3/+10
| | | | | | | | | In some circumstances zebra and ldpd would display a pseudowire as UP when in reality it's not (example: MTU mismatch between the two ends). Fix this to avoid confusion. Reported-by: ßingen <bingen@voltanet.io> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Make zapi route install Notifications optionalDonald Sharp2017-11-272-2/+2
| | | | | | | | | | | Allow the higher level protocol to specify if it would like to receive notifications about it's routes that it has installed. I've purposely made it part of zclient_new_notify because we need to track the routes on a per daemon basis only. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #1375 from donaldsharp/make_distMartin Winter2017-11-211-0/+2
|\ | | | | ldpd, zebra: Allow clippy files to be included in dist
| * ldpd, zebra: Fix `make dist` compilesDonald Sharp2017-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | The original clippy implementation used if VTYSH_EXTRACT_PL was defined or not to know to include as part of the creation of vtysh. Follow their lead here. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>