| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Label manager improvements + refactor
|
| |
| |
| |
| | |
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
LDP opens two sockets to zebra, one through ldpd (always using
instance 0) and another through lde (using whatever instance
was set through the -n command line parameter). If no instance
was set, both connections would use the same protocol and instance,
making it impossible to distinguish them through zserv_find_client.
This meant that a response to a lm connect would erroneously go to
the wrong process. Fix this by having a default instance value of 1,
in case the user does not specify a different one.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in order to both streamline the code and allow users to
define their own specialized versions of the LM api handlers,
define hooks for the 4 main primitives offered by the label
manager (i.e. connect, disconnect, get_chunk and release_chunk),
and have the existing code be run in response to a hook_call.
Additionally, have the responses to the requesting daemon be
callable from an external API.
Note that the proxy version of the label manager was a source of
issues and hardly used in practice. With the new hooks, users with
more complex requirements can simply plug in their own code to
handle label distribution remotely, so there is no longer a reason
to maintain this code.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is not part of the make check tests and it has been broken
for a while, apparently. The way the label manager is coded makes
it very hard to code unit tests, and testing the relay of requests
to an external label manager is probably better done through
a topotest, so remove this.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
when requesting a specific label chunk (e.g. for the SRGB),
it might happen that we cannot get what we want. In this
event, we must be prepared to receive a response with no
label chunk. Without this fix, if the remote label manager
was not able to alloate the chunk we requested, we would
hang indefinitely trying to read data from the stream which
was not there.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For SRGB, we need to support chunk requests starting at a
specific point in the label space, rather than just asking
for any sufficiently large chunk. To this purpose, we extend
the label manager api to request a chunk with a base value;
if the base is set to 0, the label manager will behave as it
currently does, i.e. fetching the first free chunk big enough
to satisfy the request.
update all the existing calls to get chunks from the label
manager so that they use MPLS_LABEL_BASE_ANY as the base
for the requested chunk
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
|\ \
| | |
| | | |
zebra: Add a conditional guard if zvrf lookup fail
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a conditional to guard against segfaulting on the debug
statement when zvrf lookup fails.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
|\ \ \
| | | |
| | | | |
zebra: Modify zebra to order nexthops received
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|\ \ \
| | | |
| | | | |
lib,zebra: avoid use of ctime in monotime api
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Replace a call to ctime with ctime_r in the monotime module;
update the callers of the monotime api.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|
|\ \ \ \
| | | | |
| | | | | |
bgpd: fix show bgp l2vpn evpn route json
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
PR-4544 has introduced a new filed extended community
in show bgp l2vpn evpn route command.
The header has missed checking json is enabled.
Ticket:CM-25581
Reviewed By:
Testing Done:
TORS1# show bgp l2vpn evpn route json
{
"27.0.0.15:8":{
"rd":"27.0.0.15:8",
"[2]:[0]:[48]:[00:02:00:00:00:0a]":{
"prefix":"[2]:[0]:[48]:[00:02:00:00:00:0a]",
"prefixLen":288,
"paths":[
[
{
"valid":true,
"bestpath":true,
"pathFrom":"external",
"routeType":2,
"ethTag":0,
"macLen":48,
"mac":"00:02:00:00:00:0a",
"weight":32768,
"peerId":"(unspec)",
"aspath":"",
"path":"",
"origin":"IGP",
"extendedCommunity":{
"string":"ET:8 RT:5550:1002"
},
"nexthops":[
{
"ip":"27.0.0.15",
"afi":"ipv4",
"used":true
}
]
}
]
]
},
...
},
"numPrefix":187,
"numPaths":343
}
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
bgpd: honor max prefix timer on inbound sessions
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When using the maximum-prefix restart option with a BGP peer,
if the peer exceeds the limit of prefixes, bgpd causes the
connection to be closed and sets a timer. It will not attempt
to connect to that peer until the timer expires. But if the
peer attempts to connect to it before the timer expires, it
accepts the connection and starts exchanging routes again.
When accepting a connection from a peer, reject the connection
if the max prefix restart timer is set.
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
|
|\ \ \ \
| | | | |
| | | | | |
yang: import EIGRP YANG model
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Based on feedback.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Based on Cisco YANG model but simplified to look more like FRR's CLI
options and types.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
bfdd: migrate to northbound
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Add source address to northbound when creating sessions with this
information. It is not possible to change source address after the
session was created, but we should be able to set it to make IPv6 work.
Spotted by Philippe Guibert.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Move `source-address` to after the list keys, otherwise the CLI would
get into an invalid state and be unable to set any other configuration
inside that node.
Spotted by Philippe Guibert.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Use `static` functions for file local functions to please `check_patch.pl`.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This helps northbound to create the `bfd` node on the configuration
output sooner than adding a peer.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Change `ERR_VALIDATION` to `ERR_INCONSISTENCY` to error on
inconsistent state.
* Duplicated sanity checks:
* Remove detection multiplier sanity check.
* Remove duplicated session sanity check.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Build will fail with `Werror` enabled with:
```
CC bfdd/bfdd_cli.o
In file included from ./lib/frratomic.h:21:0,
from ./lib/memory.h:22,
from ./lib/vector.h:25,
from ./lib/command.h:25,
from bfdd/bfdd_cli.c:23:
./config.h:665:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/iso/stdlib_iso.h:49:0,
from /usr/include/stdlib.h:37,
from ./lib/memory.h:20,
from ./lib/vector.h:25,
from ./lib/command.h:25,
from bfdd/bfdd_cli.c:23:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
In file included from ./lib/thread.h:24:0,
from ./lib/vty.h:27,
from ./lib/command.h:26,
from bfdd/bfdd_cli.c:23:
./lib/zebra.h:271:2: error: #warning "assuming 4-byte alignment for CMSG_SPACE" [-Werror=cpp]
#warning "assuming 4-byte alignment for CMSG_SPACE"
^
./lib/zebra.h:277:2: error: #warning "assuming 4-byte alignment for CMSG_LEN" [-Werror=cpp]
#warning "assuming 4-byte alignment for CMSG_LEN"
^
cc1: all warnings being treated as errors
Makefile:6876: recipe for target 'bfdd/bfdd_cli.o' failed
gmake[1]: *** [bfdd/bfdd_cli.o] Error 1
```
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Build will fail with `Werror` enabled with:
```
bfdd/bfdd_northbound.c:876: warning: initialized field overwritten
bfdd/bfdd_northbound.c:876: warning: (near initialization for 'frr_bfdd_info.nodes[0].cbs')
...
cc1: error: unrecognized command line option "-Wno-unused-result"
gmake[1]: *** [Makefile:6875: bfdd/bfdd_northbound.o] Error 1
```
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
the restriction to authorise multihop and interface setting has no
meaning here.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
help string had not a '\n' at the end of the line for bfd shutdown help
command.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Lets allow specification to accept microseconds, but limit the timers
configuration in FRR to milliseconds (minimum is 10 ms and maximum is 60
seconds).
This matches the RFC 5880 and the IETF BFD YANG draft model.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Make the function parameter `const` so the analyzer doesn't suspect we
are trying to change its value.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Add command 'no bfd' to remove all BFD sessions configuration and fix
other daemon integration.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
```
warnings: BFD: [EC 100663317] YANG model "frr-bfdd@*" not embedded, trying external file
```
Embed the YANG model into the binary to avoid reading an external file.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reload configuration on SIGHUP using the northbound.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When the remote discriminator hasn't been assigned yet, then we can't
return a value of 0. The value '0' is an invalid discriminator and the
yang handlers will complain about it.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Move all the `show running-config` logic to the new northbound
implementation.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Lets start using the new BFD yang model and translate the BFD session
configuration commands to use the northbound.
One important change: all sessions will default to use
`VRF_DEFAULT_NAME` (usually "default") when no VRF is configured. All
places which search for BFD sessions must now take this into account.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This command has no use for CLI and is relevant for the control socket only.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
These functions are going to be used by the future northbound
implementation to handle BFD sessions.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Some more complex CLI usages will require northbound to support
signalizing a custom configuration node end.
For an example:
```
router bgp 100
bgp router-id 10.254.254.1
neighbor 10.0.0.100 remote-as 200
!
address-family ipv4 unicast
network 10.0.1.0/24
network 10.0.2.0/24
network 10.0.3.0/24
exit-address-family
!
address-family ipv6 unicast
neighbor 10.0.0.100 activate
exit-address-family
!
```
This commit implements a new callback called `cli_show_end` which
complements `cli_show` and is only called at the end of processing the
yang configuration node. It will be used to write the configuration
node termination like: "!" or "exit-address-family".
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
New yang model to support the BFD session configuration.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
build, lib: bump libyang requirement version to >= 0.16.105 (-r3)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When using the LYD_PATH_OPT_NOPARENTRET flag, lyd_new_path() returns
the path-referenced node instead of the first created node. This
flag wasn't available in libyang 0.16-r1 so we couldn't use it
before. Use it now to simplify the code where possible.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
After ~4 months of deprecation period [1], drop support for older
libyang versions that don't support embedded extensions.
In addition to support for embedded extensions, libyang 0.16-r3
contains several bug fixes and performance improvements compared
to libyang-0.16-r1. It was about time to update.
Fixes:
* Issue #3273
* Issue #3971
[1] See commit 68626e08.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
vrrpd: set interface ifindex to internal upon deletion
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Flowspec some fixes
|