summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4660 from manuhalo/label_manager_fixesRenato Westphal2019-07-1233-1042/+393
|\ | | | | Label manager improvements + refactor
| * tests: remove lm-proxy-topo1 topotestEmanuele Di Pascale2019-07-1019-486/+0
| | | | | | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
| * ldpd: set default instance to 1Emanuele Di Pascale2019-07-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * zebra: label manager refactorEmanuele Di Pascale2019-07-107-382/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tests: remove test_lblmgr.cEmanuele Di Pascale2019-07-101-148/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * lib, zebra: handle failure in get chunkEmanuele Di Pascale2019-07-102-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * lib, zebra: support label chunk requests for SRGBEmanuele Di Pascale2019-07-109-31/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #4664 from sworleys/Zvrf-Debug-GuardRenato Westphal2019-07-121-7/+10
|\ \ | | | | | | zebra: Add a conditional guard if zvrf lookup fail
| * | zebra: Add a conditional guard if zvrf lookup failStephen Worley2019-07-091-7/+10
| | | | | | | | | | | | | | | | | | | | | Add a conditional to guard against segfaulting on the debug statement when zvrf lookup fails. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* | | Merge pull request #4325 from sworleys/Order-Recv-NexthopsRenato Westphal2019-07-121-1/+1
|\ \ \ | | | | | | | | zebra: Modify zebra to order nexthops received
| * | | zebra: Modify zebra to order nexthops receivedDonald Sharp2019-07-091-1/+1
| |/ / | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #4674 from mjstapp/fix_mono_ctimeQuentin Young2019-07-112-16/+17
|\ \ \ | | | | | | | | lib,zebra: avoid use of ctime in monotime api
| * | | lib,zebra: avoid use of ctime in monotime apiMark Stapp2019-07-102-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #4670 from chiragshah6/evpn_dev1Sri Mohana Singamsetty2019-07-101-1/+3
|\ \ \ \ | | | | | | | | | | bgpd: fix show bgp l2vpn evpn route json
| * | | | bgpd: fix show bgp l2vpn evpn route jsonChirag Shah2019-07-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge pull request #4675 from mgsmith1000/bgp_restart_timer_inboundDonald Sharp2019-07-101-0/+11
|\ \ \ \ \ | |/ / / / |/| | | | bgpd: honor max prefix timer on inbound sessions
| * | | | bgpd: honor max prefix timer on inbound sessionsMatthew Smith2019-07-101-0/+11
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #4619 from opensourcerouting/eigrpd-yangRuss White2019-07-092-2/+338
|\ \ \ \ | | | | | | | | | | yang: import EIGRP YANG model
| * | | | yang/eigrp: change active-time timer to secondsRafael Zalamena2019-07-092-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on feedback. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | yang: import EIGRP YANG modelRafael Zalamena2019-06-271-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge pull request #4609 from ton31337/fix/show_set_comm-list_deleteQuentin Young2019-07-091-2/+10
|\ \ \ \ \ | | | | | | | | | | | | bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`
| * | | | | bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`Donatas Abraitis2019-06-271-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | | | Merge pull request #4437 from opensourcerouting/bfdd-northboundRuss White2019-07-0911-409/+2282
|\ \ \ \ \ \ | | | | | | | | | | | | | | bfdd: migrate to northbound
| * | | | | | bfdd: keep source information for single hopRafael Zalamena2019-07-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | yang: change single hop `leaf` orderRafael Zalamena2019-07-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: fix some CI warningsRafael Zalamena2019-07-022-24/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `static` functions for file local functions to please `check_patch.pl`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | bfdd: convert `bfd` command to northboundRafael Zalamena2019-06-252-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: small tweaks on northboundRafael Zalamena2019-06-251-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * | | | | | bfdd: fix compilation warnings on OmniOSRafael Zalamena2019-06-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: fix compilation warnings on OpenBSDRafael Zalamena2019-06-241-80/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: authorise multihop and interface settingPhilippe Guibert2019-06-221-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the restriction to authorise multihop and interface setting has no meaning here. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | | | | | bfdd: add not '\n' to shutdown help stringPhilippe Guibert2019-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: use microseconds timers in YANGRafael Zalamena2019-06-223-36/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | lib: fix northbound static analyzer warningRafael Zalamena2019-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: support global BFD resetRafael Zalamena2019-06-224-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add command 'no bfd' to remove all BFD sessions configuration and fix other daemon integration. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | bfdd: fix daemon warning on startupRafael Zalamena2019-06-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 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>
| * | | | | | bfdd: implement configuration reloadRafael Zalamena2019-06-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reload configuration on SIGHUP using the northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | bfdd: fix northbound remote-discriminator displayRafael Zalamena2019-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: implement write_config using northboundRafael Zalamena2019-06-224-77/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all the `show running-config` logic to the new northbound implementation. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | bfdd: migrate session commands to northboundRafael Zalamena2019-06-228-279/+1397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | bfdd: remove the label commandRafael Zalamena2019-06-221-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command has no use for CLI and is relevant for the control socket only. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | bfdd: export some private functionsRafael Zalamena2019-06-222-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are going to be used by the future northbound implementation to handle BFD sessions. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | | | | | lib: northbound cli support to end config nodesRafael Zalamena2019-06-222-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | yang: import BFD yang modelRafael Zalamena2019-06-221-0/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New yang model to support the BFD session configuration. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | | | | | Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-versJafar Al-Gharaibeh2019-07-094-39/+5
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | build, lib: bump libyang requirement version to >= 0.16.105 (-r3)
| * | | | | | lib: use flag from new libyang version to simplify the codeRenato Westphal2019-07-021-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | build, lib: bump libyang requirement version to >= 0.16.105Renato Westphal2019-07-023-30/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Merge pull request #4655 from qlyoung/fix-vrrp-iface-del-infiniteloopRenato Westphal2019-07-091-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | vrrpd: set interface ifindex to internal upon deletion
| * | | | | | | vrrpd: set interface ifindex to internal upon deletionQuentin Young2019-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | | | | | Merge pull request #4511 from pguibert6WIND/flowspec_some_fixesRuss White2019-07-098-24/+92
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Flowspec some fixes