| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Can be detected with e.g. ./configure CFLAGS=-Wcast-qual CC=clang
Signed-off-by: F. Aragon <paco@voltanet.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
debian# show mpls ldp interface
AF Interface State Uptime Hello Timers ac
ipv4 rt0-eth0 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth1 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth10 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth11 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth2 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth3 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth4 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth5 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth6 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth7 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth8 ACTIVE 00:00:05 5/15 1
ipv4 rt0-eth9 ACTIVE 00:00:05 5/15 1
After:
debian# show mpls ldp interface
AF Interface State Uptime Hello Timers ac
ipv4 rt0-eth0 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth1 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth2 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth3 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth4 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth5 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth6 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth7 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth8 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth9 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth10 ACTIVE 00:00:14 5/15 1
ipv4 rt0-eth11 ACTIVE 00:00:14 5/15 1
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Handling configuration changes from single-stack mode to dual-stack mode
(and vice-versa) is tricky. This patch attempts to solve all issues that
might happen on such circumstances.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the transport address is changed, all interfaces and targeted
neighbors are temporary disabled in the ldpe process until new sockets
bound to the new transport address are received from the parent.
This patch fixes a problem in which adjacencies weren't being removed
after the associated targeted neighbors were disabled. This was causing
ldpd not to set some MD5 sockoptions for new neighbors are thus preventing
MD5-protected sessions to come up after a change in the transport-address.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| | |
Signed-off-by: Renato Westphal <renato@openbsd.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Switch the RB tree implementation completely to the new dlg@'s version
that uses pre-declared functions instead of macros for tree functions.
Original e-mail/diff:
https://marc.info/?l=openbsd-tech&m=147087487111068&w=2
Pros:
* Reduces the amount of code that the usage of those macros generate
* Allows the compiler to do a better compile-time check job
* Might have better i-cache utilization since the tree code is shared
Con:
* dlg@ benchmarks shows it has 'very slightly slower' insertions
* imported RB_* code must adapt the following calls:
RB_INIT(), RB_GENERATE(), RB_ROOT(), RB_EMPTY(), make compare
functions use 'const' (if not already) and maybe others.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pass pointer to pointer instead of assigning by return value. See
previous commit message.
To ensure that the behavior stays functionally correct, any assignments
with the result of a thread_add* function have been transformed to set
the pointer to null before passing it. These can be removed wherever the
pointer is known to already be null.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The way thread.c is written, a caller who wishes to be able to cancel a
thread or avoid scheduling it twice must keep a reference to the thread.
Typically this is done with a long lived pointer whose value is checked
for null in order to know if the thread is currently scheduled. The
check-and-schedule idiom is so common that several wrapper macros in
thread.h existed solely to provide it.
This patch removes those macros and adds a new parameter to all
thread_add_* functions which is a pointer to the struct thread * to
store the result of a scheduling call. If the value passed is non-null,
the thread will only be scheduled if the value is null. This helps with
consistency.
A Coccinelle spatch has been used to transform code of the form:
if (t == NULL)
t = thread_add_* (...)
to the form
thread_add_* (..., &t)
The THREAD_ON macros have also been transformed to the underlying
thread.c calls.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
When the transport address is changed, all interfaces and targeted
neighbors are temporary disabled in the ldpe process until new sockets
bound to the new transport address are received from the parent.
This patch fixes a problem in which adjacencies weren't being removed
after the associated targeted neighbors were disabled. This was causing
ldpd not to set some MD5 sockoptions for new neighbors are thus preventing
MD5-protected sessions to come up after a change in the transport-address.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
| |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the "show mpls ldp discovery" command will display all LDP
adjancencies sorted by address family, neighbor ID and then type (link
or targeted).
Example:
vtysh# show mpls ldp discovery
AF ID Type Source Holdtime
ipv4 3.3.3.3 Link rt2-eth1 15
ipv4 3.3.3.3 Link rt2-eth2 15
ipv4 4.4.4.4 Link rt2-eth1 15
ipv6 1.1.1.1 Link rt2-eth0 15
ipv6 3.3.3.3 Link rt2-eth1 15
ipv6 3.3.3.3 Link rt2-eth2 15
ipv6 4.4.4.4 Link rt2-eth1 15
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>
|
|
|
|
|
|
|
|
| |
Now we can have two different adjacencies coming from the same source
address. Check for the adjacency's interface on adj_find() to disambiguate
them.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
| |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|