summaryrefslogtreecommitdiff
path: root/lib/module.c
AgeCommit message (Collapse)Author
2021-09-14lib/module.c and callers of frrmod_load(): fix error messagesG. Paul Ziemba
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>
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-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_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-02-01lib: "xref" identifier infrastructureDavid Lamparter
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>
2020-03-04*: Use true/false instead of 1/0 when assigning variable for bool typeDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-02-25*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-12-14lib: flip to ISC on hook & module codeDavid Lamparter
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>
2018-07-06eigrpd lib pimd zebra: dead code (PVS-Studio)F. Aragon
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-07bgpd, lib, ospf6d, vtysh: fix possible snprintf possible truncationDonald Sharp
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>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-08-26*: fix compiler warningsDavid Lamparter
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>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-12lib: fix error message to reference FRRJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-04-21lib: Add CLI option --moduledir to override default module location (needed ↵Martin Winter
for snap support) Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-03-24lib: dynamic module loadingDavid Lamparter
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>