| Commit message (Collapse) | Author | Files | Lines |
|
On BSD systems, the getgrouplist() function returns 0 if successful and
-1 on error.
Linux in the other hand returns *ngroups (the number of groups of which
user is a member) on success and -1 on error.
Given this difference, the most portable way to use getgrouplist()
is use its return value only for checking if it succeeded or not.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Signed-off-by: Lou Berger <lberger@labn.net>
|
|
Signed-off-by: Lou Berger <lberger@labn.net>
|
|
[CF]: Move default name to autoconf and update tests
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Also add a note that this is documentation, not law.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
DEPRECATED: Assets in 'setup/gui' should now be placed in 'snap/gui'.
See http://snapcraft.io/docs/deprecation-notices/dn3 for more information.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
When compiling zebra_fpm_dt.c only pull in
protobuf headers if we've turned it on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
When compiling w/ --enable-protobuf on stable/2.0
we were attempting to dereference the zvrf->vrf_id
which got moved to zvrf->vrf->vrf_id.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Suppose we are handling the process_workq and either a new static
route is installed or a Routing Protocol installs a new route.
We will call evaluate_rnh with a specific prefix. We might
have a situation where we clear the NHC flag prematurely.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
Signed-off-by: Lou Berger <lberger@labn.net>
[DL: dropped changes except the two NULL assignments]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
This reverts commit 039dc61292de5f3ed5f46316b1940ab6bb184c3f.
The patch actually made the situation worse since the return value from
cmd_complete_command_real() was now inconsistently allocated from
different memory stat pools.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
Zebra when it was scanning the tree would unset NEXTHOPS_CHANGED
after the first notification. If the route we are notifying because
of covers multiple interesting nexthops then we would be unable
to know that we need to notify for that one as well because of
the flag removal.
Ticket: CM-15157
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
The return value from cmd_complete_command is a VECTOR_INDEX, not TMP.
Use the appropriate vector_only_index_free().
Fixes #223.
Reported-by: https://github.com/k0ste
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
The original code on shutdown assumed a 'forced' mode
if there was no process_main_queue. This construct
was violated by commit 2e02b9b2d1ed29975001d6917f9f726854ec5559
due to not fully understanding the shutdown process.
If we are shutting down, don't store work to do later,
just gracefully don't do it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
This define is used only to guard macros in lib/linklist.h which
themselves are not used anywhere in the codebase and have been marked
deprecated since anno domini 2005
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Wrong offset was used when using global V6 address in place of
v6 LL. (Introduced in earlier fix of broken RD advertisement.)
Tested by @dslice in master.
Signed-off-by: Lou Berger <lberger@labn.net>
|
|
The buffer needs to be set to length 0 if nothing is written into
it, otherwise bgpd will log uninitialized memory, disclosing information
and possibly leading to a crash.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
|
|
Ubuntu 12.04 doesn't have a pytest package - needs to be installed with pip
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
limited line length to < 80 chars where possible
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
Fix pytest with $(top_srcdir) != "."
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
Coverity: string_overflow: You might overrun the 100-character destination string vty_path by writing 4096 characters from vty_sock_path.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Needs to be a comparison, not assignment
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Needs to be size of correct structure (prefix instead of prefix_ipv4)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
small (BUFFER_SIZE)
Coverity: buffer_size: You might overrun the 108 byte destination string addr.sun_path by writing the maximum 4095 bytes from path.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
terminated (BUFFER_SIZE_WARNING)
Coverity: buffer_size_warning: Calling strncpy with a maximum size argument of 100 bytes on destination array pid_file of size 100 bytes might leave the destination string unterminated.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
Pulling in source files from another directory breaks automake's
distclean target, and there seems to be no good fix for this...
(particularly since we need -fPIC build for a DSO here, while ospfd
compiles for an executable...)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
sync() has a HUGE impact on systems that perform actual I/O, i.e. real
servers...
Also, we were leaking a fd on each config write ever since
c5e69a0 "lib/vty: add separate output fd support to VTYs"
(by myself :( ...)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Cleanup Quagga.conf -> Frr.conf
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|