| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Vrf backend unknown
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
on interface search algorithm, at initialisation, when reading config
file, the vrf backend may not be yet known ( because zebra did not sync
yet with daemon). For that, avoid searching interface name in a separate
vrf. This change of behaviour is induced because the assumption is done
that at config startup, the user is not wrong with the interface
configuration to use. Every usage of vrf_get_backend() should then be
wisely adapted in order to handle that init state.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
other daemons need to sync with zebra to get to know which vrf backend
is available. in that time, there may be interface configuration
available. in that specific case, the vrf backend returned is not known.
A specific return value is sent back. This will be useful to know which
specific algorithm to apply.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
|\ \
| | |
| | | |
pbrd: add support for interface nexthops
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When displaying the running configuration, we should use a single
space to indent commands when necessary (and not two spaces).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds support to nexthops of type NEXTHOP_TYPE_IFINDEX to
nexthop-groups. This should be especially useful when dealing with
p2p interfaces like tunnels that don't have IP addresses assigned
to them.
NOTE: nh->addr can be NULL now, so we should always perform a null
check before dereferencing this pointer.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use a pointer to a sockunion instead of a full sockunion in the
nexthop_hold structure. This prepares the ground for the next commit,
which will make nexthop addresses optional (in this commit we assume
nh->addr will never be NULL, but this will change).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Reuse the nhgl_delete() function to avoid code duplication.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\ \ \
| | | |
| | | | |
libs: fix race in privs changes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use the privs struct mutex more strictly, to ensure that the
privs are at the level the caller expects when the apis
return.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|
|\ \ \ \
| |/ / /
|/| | | |
*: remove trailing newlines from zlog messages
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Zlog puts its own newlines on, and doing this makes logs look nasty.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|\ \ \ \
| |/ / /
|/| | | |
lib: fix removal of yang non-presence containers
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Non-presence containers don't have "destroy" callbacks. So, once
a np-container is deleted, we need to call the "destroy" callbacks
of its child nodes instead.
This commit doesn't fix any real problem as of now since all
np-containers from the FRR YANG modules contain or one more mandatory
child nodes, so they can't be deleted (libyang will add missing
np-containers when validating data). Nevertheless, upcoming YANG
modules should benefit from this change.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is just a small refactoring to reduce code duplication. No
behavior changes intended.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\ \ \ \
| | | | |
| | | | | |
libs: make privilege elevation thread-safe
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Privs escalation is process-wide, and a multi-threaded process
can deadlock. This adds a mutex and a counter to the privs
object, preventing multiple threads from making the privs
escalation system call.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|
|\ \ \ \
| |/ / /
|/| | | |
Assorted Coccinelle fixes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
No cast necessary for void *
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
So don't check it
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
They never return NULL
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Not 1 or 0.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- bools should be initialized with true/false
- bools do not need to be compared
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|\ \ \ \
| | | | |
| | | | | |
Remove strncpy
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
strncpy is a byte copy function not a string copy function
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|\ \ \ \
| | | | |
| | | | | |
Refine install of EVPN-based routes to remove some special handling
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In the case of EVPN symmetric routing, the tenant VRF is associated with
a VNI that is used for routing and commonly referred to as the L3 VNI or
VRF VNI. Corresponding to this VNI is a VLAN and its associated L3 (IP)
interface (SVI). Overlay next hops (i.e., next hops for routes in the
tenant VRF) are reachable over this interface. Howver, in the model that
is supported in the implementation and commonly deployed, there is no
explicit Overlay IP address associated with the next hop in the tenant
VRF; the underlay IP is used if (since) the forwarding plane requires
a next hop IP. Therefore, the next hop has to be explicit flagged as
onlink to cause any next hop reachability checks in the forwarding plane
to be skipped.
https://tools.ietf.org/html/draft-ietf-bess-evpn-prefix-advertisement
section 4.4 provides additional description of the above constructs.
Use existing mechanism to specify the nexthops as onlink when installing
these routes from bgpd to zebra and get rid of a special flag that was
introduced for EVPN-sourced routes. Also, use the onlink flag during next
hop validation in zebra and eliminate other special checks.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|\ \ \ \
| |/ / /
|/| | | |
lib, rip, ripng, eigrp: rework if_rmap context
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
an interface rmap context can be created from a custom name string,
instead of a vrf. This ability permits to handle several instances of
interface route map in the same vrf. The naming convention will be
transparent on what the name is for in the daemon code.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
so as to handle ri/ripng/eigrp multiple instances, the need is to
encapsulate if_rmap hash table into a container context self to each
instance. This work then reviews the if_rmap api, mainly by adding a
if_rmap_ctx context, that is passed for each exchange between library
and the daemon.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Presume typo from original author
Signed-off-by: Tim Bray <tim@kooky.org>
|
|\ \ \ \
| | | | |
| | | | | |
[master] debian packaging
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
After creating a libyang context, we need to hook up our callback to use
embedded built-in modules. I hadn't added this to the yang translator
code.
Also, ly_ctx_new fails if the search directory doesn't exist. Since
that's not a hard error for us, work around that and ignore inaccessible
YANG_MODELS_DIR. (This is needed for snap packages.)
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
The DEFPY_HIDDEN commands were not being picked up
into vtysh. Fix this issue.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* command_graph.h: stop using "new" as a parameter name as that's a
reserved C++ keyword.
* module.h: avoid using C99 designated initializers since C++ doesn't
support them. This change hurts code readability quite considerably,
so we should try to find a better solution later.
* pw.h: remove unneeded empty structure to silence a C++ warning.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
C++ doesn't support implicit casts from void pointers like C
does. And the libfrr headers have some bits of code that rely on
implicit casts in order to work. To solve this problem, add a new
"static_cast" macro that performs explicit static casts when a C++
compiler is being used, or do nothing otherwise.
NOTE: since macros are only evaluated when they are used, there
might be other macros from libfrr that will need to use "static_cast"
as well. If a header is successfully compiled using a C++ compiler,
there's no guarantee that its macros are compatible with C++. We'll
only know about such macros when they are used by C++ code, then
we'll need to adapt them one by one in the future.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two different definitions of "enum filter_type" exist in libfrr:
one in lib/filter.h and other in lib/command_match.h. Rename one
of them to resolve a conflict that happens when both headers are
included by the same file.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| |
| | |
These are necessary to use functions defined in these headers from C++.
Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| |
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| |
| |
| |
| |
| |
| |
| | |
C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use
std::atomic instead to get the headers compatible.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| |
| |
| |
| |
| |
| |
| | |
Add a no-op conversion constructor to tell C++ that union prefixptr
accepts any of its member types.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| |
| |
| |
| |
| |
| |
| | |
This reverts the lib/table.h change from commit
049b31f7d810fd70069e3edbbd3fea6b5c7af98f.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change the northbound lib operation from DELETE to DESTROY;
make the required changes in the users of the northbound, in
the cli, rip, ripng, and isis.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|