summaryrefslogtreecommitdiffstats
path: root/lib/module.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib/module.c and callers of frrmod_load(): fix error messagesG. Paul Ziemba2021-09-141-16/+76
| | | | | | | | | | | | | | | | | frrmod_load() attempts to dlopen() several possible paths (constructed from its basename argument) until one succeeds. Each dlopen() attempt may fail for a different reason, and the important one might not be the last one. Example: dlopen(a/foo): file not found dlopen(b/foo): symbol "bar" missing dlopen(c/foo): file not found Previous code reported only the most recent error. Now frrmod_load() describes each dlopen() failure. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
* build: make builddir include path consistentDavid Lamparter2021-04-211-1/+1
| | | | | | | ... 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>
* *: require semicolon after FRR_DAEMON_INFO & co.David Lamparter2021-03-171-1/+1
| | | | | | ... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-2/+2
| | | | | | | | | | | | | | | | | 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>
* lib: "xref" identifier infrastructureDavid Lamparter2021-02-011-0/+2
| | | | | | | | | | | | This adds the machinery for cross reference points (hence "xref") for things to be annotated with source code location or other metadata and/or to be uniquely identified and found at runtime or by dissecting executable files. The extraction tool to walk down an ELF file is done and working but needs some more cleanup and will be added in a separate commit. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Use true/false instead of 1/0 when assigning variable for bool typeDonatas Abraitis2020-03-041-2/+2
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: remove null check before XFREEQuentin Young2019-02-261-2/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: flip to ISC on hook & module codeDavid Lamparter2018-12-141-16/+10
| | | | | | | I accidentally put MIT headers on these; the intent was ISC. It doesn't really make a difference, but let's get it consistent. Signed-off-by: David Lamparter <equinox@diac24.net>
* eigrpd lib pimd zebra: dead code (PVS-Studio)F. Aragon2018-07-061-1/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* bgpd, lib, ospf6d, vtysh: fix possible snprintf possible truncationDonald Sharp2018-06-081-1/+1
| | | | | | | | | With a new version of clang 6.0, the compiler is detecting more issues where we may be possibly be truncating the output string. Fix by increasing the size of the output string to make the compiler happy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-4/+5
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* *: fix compiler warningsDavid Lamparter2017-08-261-2/+4
| | | | | | | | Specifically, gcc 4.2.1 on OpenBSD 6.0 warns about these; they're bogus (gcc 4.2, being rather old, isn't quite as "intelligent" as newer versions; the newer ones apply more logic and less warnings.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-15/+13
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: fix error message to reference FRRJafar Al-Gharaibeh2017-07-121-1/+1
| | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* lib: Add CLI option --moduledir to override default module location (needed ↵Martin Winter2017-04-211-3/+3
| | | | | | for snap support) Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
* lib: dynamic module loadingDavid Lamparter2017-03-241-0/+159
This adds a "-M" option to each daemon, to load dynamic modules at startup. Modules are by default located in /usr/lib/frr/modules (lib64 if appropriate). Unloading or loading at runtime is not supported at this point to keep things simple. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>