summaryrefslogtreecommitdiff
path: root/lib/ptm_lib.c
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-20*: sprintf -> snprintfQuentin Young
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>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-09*: Remove parenthesis on return for constantsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-08-06*: fix ctype (isalpha & co.) castsDavid Lamparter
The correct cast for these is (unsigned char), because "char" could be signed and thus have some negative value. isalpha & co. expect an int arg that is positive, i.e. 0-255. So we need to cast to (unsigned char) when calling any of these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2018-09-08*: fix config.h/zebra.h include orderDavid Lamparter
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>
2018-06-18babeld, lib, ospfd, tests: fmt fixes (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-02-02*: silence '-Wchar-subscripts' warnings on NetBSDRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-02-02*: silence '-Wmaybe-uninitialized' warnings on NetBSDRenato Westphal
None of these variables can actually be used before being initialized, but unfortunately some old compilers are not smart enough to detect that. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-12-04lib: Allow memory to be cleaned up for error cases in ptmDonald Sharp
ptm_lib.c had no way to cleanup after itself when an error was detected. This adds a function to cleanup context in such a case. A followup commit will use this new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-08lib: fix clang warningVincent JARDIN
Properly initialize to avoid "Branch condition evaluates to a garbage value" warning. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
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-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-01lib: Fix possible array overrunDonald Sharp
It is possible if the hostname is > 32 characters that we would just overrun the client_name data structure. Truncate the hostname string to 31 characters (to allow for NULL) Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-11-18*: Fix up licensing to be rightDonald Sharp
These files were submitted by Cumulus but did not properly setup the licensing of them. This fixes that issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2015-07-25Fixup of warnings in the codeDonald Sharp
Ticket: None Reviewed by: Trivial Testing: A bunch of warnings have crept in to the code base. This fixes the issue
2015-06-12This patch changes BGP from only listening mode for BFD status updates to ↵Donald Sharp
interactive mode of dynamically registering/deregistering BFD enabled peers with PTM/BFD through zebra. Peer is registered with BFD when it goes into established state and de-registers when it goes out of establish state. This patch also adds BFD multihop support for BGP. Whether a peer is multi-hop or single hop is determined internally. All IGP peers are considered as multi-hop peers. EBGP peers are considered as single hop unless configured as multi-hop. BGP BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). router bgp <as-number> neighbor <name/ip-address> bfd <detect mult> <min rx> <min tx> Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>