summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-18Merge pull request #4731 from mjstapp/fix_redist_updateDonald Sharp
zebra: redistribute deletes when updating selected route
2019-09-18Merge pull request #4990 from qlyoung/yang-iface-operdataRenato Westphal
lib: add oper data cbs for ifaces
2019-09-18Merge pull request #5004 from idryzhov/fix-vtysh-prefix-listDonald Sharp
vtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in running-config
2019-09-18lib: add oper data cbs for ifacesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-18Merge pull request #5008 from opensourcerouting/nb-improvementsQuentin Young
northbound fixes and enhancements
2019-09-18lib: add an exception in the northbound for operational data callbacksRenato Westphal
During initialization, the northbound detects if any required callback is missing (fatal error) or if any unneeded callback is present (warning). There are three callbacks, however, that should require special handling: get_next(), get_keys() and lookup_entry(). These callbacks are normally unneeded for configuration lists. But, if a configuration list is augmented with new state nodes by another module, then the three callbacks mentioned above become required. In this case, never log a warning when these callbacks are implemented when they are not needed, since this depends on context (e.g. some daemons might augment "frr-interface" while others don't). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18lib: fix ordering issues in the northboundRenato Westphal
When a configuration transaction is being performed, the northbound uses a red-black tree to store the configuration changes that need to be processed. The problem is that we were sorting the configuration changes based on their XPaths (and callback priorities). This means the original order of the changes wasn't being respected, which is a problem for lists that use the "ordered-by user" statement. To fix this, add a new "seq" member to the "nb_config_cb" structure so that we can preserve the order of the configuration changes as told by libyang. Since none of the FRR modules use "ordered-by user" lists so far, no daemon was affected by this problem. Reported-by: Martin Winter <mwinter@opensourcerouting.org> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18lib: fix corner case when iterating over YANG-modeled operational dataRenato Westphal
When updating the XPath during the iteration of operational data, include the namespace of the augmenting module when necessary. Reported-by: Quentin Young <qlyoung@cumulusnetworks.com> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18Revert "lib: introduce a read-write lock for northbound configurations"Renato Westphal
Adding a lock to protect the global running configuration doesn't help much since the FRR daemons are not prepared to process configuration changes in a pthread that is not the main one (a whole lot of new protections would be necessary to prevent race conditions). This means the lock added by commit 83981138 only adds more complexity for no benefit. Remove it now to simplify the code. All northbound clients, including the gRPC one, should either run in the main pthread or use synchronization primitives to process configuration transactions in the main pthread. This reverts commit 83981138fe8c1e0a40b8dede74eca65449dda5de.
2019-09-18lib: introduce new 'pre_validate' northbound callbackRenato Westphal
This callback can be used to validate subsections of the configuration being committed before validating the configuration changes themselves. It's useful to perform more complex validations that depend on the relationship between multiple nodes. Only YANG-level validation (performed by libyang) and the NB_EV_VALIDATE validation (that can be used to validate individual configuration changes) proved to be insufficient in some cases. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18lib: add yang wrappers for IP prefixesRenato Westphal
We had wrappers for IPv4 and IPv6 prefixes, but not for IP (version agnostic) prefixes. This commit addresses this issue. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18Merge pull request #5006 from manuhalo/fix_ftn_uninstallDonald Sharp
zebra: fix mpls ftn uninstall
2019-09-18zebra: fix mpls ftn uninstallEmanuele Di Pascale
when a client disconnects, we iterate over the routing table to remove any label that originated from that client. However we were erroneously passing the route type to the function, while it was expecting the lsp type. As a result, for example, killing ldpd would not remove the ldp labels from the routes. Kudos to @rwestphal for pointing me to the source of the issue. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-09-18Merge pull request #5003 from manuhalo/fix_bgp_bmp_oot_buildRenato Westphal
bgpd: fix include path for bgp_bmp_clippy.c
2019-09-18vtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in ↵Igor Ryzhov
running-config Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-09-18Merge pull request #4984 from Alexis-ROYER/pim-doc#4965Donald Sharp
[PIM] Confusing documentation for `ip pim sm` command (#4965)
2019-09-18bgpd: fix include path for bgp_bmp_clippy.cEmanuele Di Pascale
not using a relative path was breaking out-of-tree compilation Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-09-18doc/user: Confusing documentation for `ip pim sm`Alexis Royer
Modification of the documentation for the `ip pim sm` command in order to avoid the understanding of an incompatibility with IGMP on the interface. Signed-off-by: Alexis Royer <alexis.royer@gmail.com>
2019-09-17Merge pull request #4966 from Orange-OpenSource/isis-TERenato Westphal
isisd: Update TLVs processing for TE, RI & SR
2019-09-17Merge pull request #5001 from qlyoung/fix-frr-pthread-reachable-blocksRuss White
lib: clean up frr_pthread structs at exit
2019-09-17Merge pull request #4996 from opensourcerouting/build-tagsDonald Sharp
build: fix "make tags"
2019-09-17lib: clean up frr_pthread structs at exitQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-17isisd: Update TLVs processing for TE, RI & SROlivier Dugeon
In preparation to Segment Routing: - Update the management of Traffic Engineering subTLVs to the new tlvs parser - Add Router Capability TLV 242 as per RFC 4971 & 7981 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25 Modified files: - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process TE subTLVs, Router Capability TLV and SR subTLVs - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing - isis_te.[c,h]: remove all old TE structures and managment functions, and add hook call to set local and remote IP addresses as wellas update TE parameters - isis_zebra.[c,h]: add hook call when new interface is up - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-09-17Merge pull request #4861 from NaveenThanikachalam/logsLou Berger
BGP: Rectifying the log messages.
2019-09-17Merge pull request #4992 from opensourcerouting/isisd-assorted-changesOlivier Dugeon
isisd: assorted changes
2019-09-17build: fix "make tags"David Lamparter
Anything we list in a xxx_SOURCES variable will be included for "make tags", including filess marked as nodist_xxx_SOURCES. So if we don't have Protobuf enabled, even though the entire library isn't built, "make tags" will still try to process these files... which we can't autogenerate because Protobuf is disabled. Same for gRPC. Fixes: #3266 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17Merge pull request #4993 from ton31337/fix/remove_trailing_whitespacesDonald Sharp
bgpd: Remove trailing whitespaces from some header files
2019-09-17Merge pull request #4988 from donaldsharp/watchfrr_ignore_daemonRuss White
Watchfrr ignore daemon
2019-09-17Merge pull request #4981 from donaldsharp/bgp_distanceRuss White
Bgp distance
2019-09-17Merge pull request #4980 from sworleys/PBR-Check-NHT-GW-IfindexRuss White
pbrd: Handle GATEWAY_IFINDEX nht conflicts
2019-09-17Merge pull request #4970 from shikenghua/prefer_globalRuss White
bgpd: prefer-global command not working on IPv4 peers
2019-09-17Merge pull request #4887 from vishaldhingra/lcomm_jsonRuss White
lib: rmap dep table is not correct in case of exact-match clause
2019-09-17Merge pull request #4810 from qlyoung/fix-pthread-bad-pointerRuss White
Fix potential frr_pthread.c stale pointer
2019-09-17Merge pull request #4564 from pguibert6WIND/misc_vrf_update_nameRuss White
Misc vrf update name
2019-09-17Merge pull request #4985 from qlyoung/fix-bgp-zero-keepalive-timerDonatas Abraitis
bgpd: do not send keepalives when KA timer is 0
2019-09-17bgpd: Remove trailing whitespaces from some header filesDonatas Abraitis
This is annoying when editing a file and saving the file. IDEs like VSCode can automatically remove trailing whitespaces, hence it would be better having a clean code before pushing other changes. I step onto this not the first time. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-17Merge pull request #4991 from qlyoung/readme-add-apt-repoDonatas Abraitis
README.md: add reference to apt repo
2019-09-17isisd: fix validation of prefix-sid flagsRenato Westphal
The original check would always evaluate to false since ISIS_PREFIX_SID_VALUE and ISIS_PREFIX_SID_LOCAL have different values. Use !! to normalize the return value of the individual checks to either 0 or 1, making the code do what was intended (ensure the V/L flags are both 0 or 1). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17README.md: add reference to apt repoQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-17isisd: introduce new route update hookRenato Westphal
This hook will be called whenever a route is added, updated or deleted. It will be used, for instance, by the SR code to keep Prefix-SIDs in sync with their associated routes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17isisd: move management of route flags out of isis_zebra.cRenato Westphal
For better modularity, isis_zebra.c should only contain code used to communicate with zebra. The management of route flags belongs to isis_route.c. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17isisd: remove leftover from old dict codeRenato Westphal
This is unnecessary since commit 4bef0ec4fbe was merged. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-16Merge pull request #4987 from mjstapp/fix_unused_nht_apiDonald Sharp
zebra: remove empty, unused internal api
2019-09-16watchfrr: Convert `wtf` to a more meaningful messageDonald Sharp
There is a fairly common state we are seeing where watchfrr has decided that something is not right and is printing out a `wtf` message. At this point I am not sure what is going on or how we are getting here, but let's add a bit more data dump to the message so that we can figure out what is going on. This is mainly being done because at this point in time I have no clue the what/how of how we got here and I cannot reproduce. Maybe by adding more useful information here I can figure out what is going on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2019-09-16doc: Add watchfrr documentationDonald Sharp
Start the documentation for watchfrr. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-16watchfrr: Allow end users to turn off watchfrr for a particular daemonDonald Sharp
Allow an end user who is debugging behavior, with say gdb, to turn off watchfrr and it's attempts to keep control of a daemons up/responsiveness With code change: donna.cumulusnetworks.com# show watchfrr watchfrr global phase: Idle zebra Up bgpd Up/Ignoring Timeout staticd Up Now grab bgpd with gdb: sharpd@donna ~/frr4> date ; sudo gdb -p 27893 Mon 16 Sep 2019 01:44:57 PM EDT GNU gdb (GDB) Fedora 8.3-6.fc30 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 27893 [New LWP 27894] [New LWP 27895] [New LWP 27896] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". 0x00007f1787a3e5c7 in poll () from /lib64/libc.so.6 Missing separate debuginfos, use: dnf debuginfo-install glibc-2.29-15.fc30.x86_64 gperftools-libs-2.7-5.fc30.x86_64 json-c-0.13.1-4.fc30.x86_64 libcap-2.26-5.fc30.x86_64 libgcc-9.1.1-1.fc30.x86_64 libgcrypt-1.8.4-3.fc30.x86_64 libgpg-error-1.33-2.fc30.x86_64 libstdc++-9.1.1-1.fc30.x86_64 libxcrypt-4.4.6-2.fc30.x86_64 libyang-0.16.105-1.fc30.x86_64 lua-libs-5.3.5-5.fc30.x86_64 lz4-libs-1.8.3-2.fc30.x86_64 pcre-8.43-2.fc30.x86_64 xz-libs-5.2.4-5.fc30.x86_64 (gdb) In another window we can see when watchfrr thinks it's not responding: donna.cumulusnetworks.com# show watchfrr watchfrr global phase: Idle zebra Up bgpd Unresponsive/Ignoring Timeout staticd Up Finally exit gdb and watchfrr now believes bgpd is good to go again: donna.cumulusnetworks.com# show watchfrr watchfrr global phase: Idle zebra Up bgpd Up/Ignoring Timeout staticd Up Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-16bgpd: do not send keepalives when KA timer is 0Quentin Young
RFC4271 specifies behavior when the hold timer is sent to zero - we should not send keepalives or run a hold timer. But FRR, and other vendors, allow the keepalive timer to be set to zero with a nonzero hold timer. In this case we were sending keepalives constantly and maxing out a pthread to do so. Instead behave similarly to other vendors and do not send keepalives. Unsure what the utility of this is, but blasting keepalives is definitely the wrong thing to do. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16tests: update tests for pthread init changesQuentin Young
Need to init frr_pthreads manually in tests now. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16lib: handle frr_pthread_init/fini in libfrr initQuentin Young
Make sure we are always cleaning init'ing and cleaning up pthread infra. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16lib: delete pthread from tracking list on deleteQuentin Young
Pthreads were not being deleted from the list after destruction. This isn't causing any bugs currently but that's just by dumb luck. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>