summaryrefslogtreecommitdiffstats
path: root/isisd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: do not disable circuit on ifdownEmanuele Di Pascale2020-02-191-1/+0
| | | | | | | | | | when zebra detects that an interface is gone, notify the circuit but do not disable it - the interface is still configured until it isn't. Without this fix, removing the interface in the kernel and then removing the circuit from the configuration would cause an assertion in isis_csm.c:78 Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* *: Remove break after returnDonatas Abraitis2020-02-131-10/+0
| | | | | | Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* Merge pull request #5104 from opensourcerouting/route-map-nbv2Donald Sharp2020-02-051-0/+2
|\ | | | | lib: migrate route map to use northbound
| * *: fix route map integrationRafael Zalamena2020-02-041-0/+2
| | | | | | | | | | | | | | Add the appropriated code to bootstrap route map northbound for all daemons. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | *: don't null after XFREE; XFREE does this itselfQuentin Young2020-02-031-1/+0
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd, yang: set default is-type to level-1-2Emanuele Di Pascale2019-12-171-5/+2
| | | | | | | | | | | | | | | | Currently isisd has this strange (legacy) behavior where the first area is created by default with level-1-2, while every other subsequent area uses the default defined in the yang model, which is level-1. This is a source of confusion when trying to configure the daemon programatically, either with frr-reload or using the transactional cli. Given how rare having multiple IS-IS instances is anyway, the easiest solution is to remove this behavior and default to level-1-2 for every area. Note that this does not affect fabricd, which continues using exclusively level-2-only areas. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: Free memory when confusedDonald Sharp2019-12-131-0/+2
| | | | | | | | | | When you call into lsp_update with confusion, the lsp is purged and we do not do anything with the created tlv's from parsing the incoming data. To prevent the tlv's from being leaked note confusion and delete the unneeded data. Fixes: #5496 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: clean ipv4/6 circuit config on destroyEmanuele Di Pascale2019-12-091-2/+6
| | | | | | | | | | | | when deleting an isis interface config with 'no [ip|ipv6] router isis' we are destroying the isis yang container for that interface, but the actual circuit struct is kept, and so are the flgs determining whether that circuit is configured for ipv4 and/or ipv6. This caused issues when removing and re-adding configuration, as the area counters for ip circuits were not correctly updated and the topology was never populated. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #4765 from opensourcerouting/defaults-v2Donald Sharp2019-12-061-1/+0
|\ | | | | lib/*: new config defaults system, v2
| * lib: rename memory_vty.c to lib_vty.cDavid Lamparter2019-12-061-1/+0
| | | | | | | | | | | | And memory_init() to lib_cmd_init(). Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: revise zapi nexthop encodingMark Stapp2019-12-061-1/+1
|/ | | | | | | | Use a per-nexthop flag to indicate the presence of labels; add some utility zapi encode/decode apis for nexthops; use the zapi apis more consistently. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: generously apply constDavid Lamparter2019-12-026-28/+33
| | | | | | const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: make frr_yang_module_info constDavid Lamparter2019-11-301-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: make all route_map_rule_cmd constDavid Lamparter2019-11-301-15/+30
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Convert connected_free to a double pointerDonald Sharp2019-11-021-1/+1
| | | | | | Set the connected pointer to set the pointer to NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert prefix_free to double pointerDonald Sharp2019-11-021-5/+5
| | | | | | Have the prefix_free code take a double pointer to free the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: split northbound callbacks into multiple filesRenato Westphal2019-10-3017-4108/+4503
| | | | | | | | | | | | | | | | | Rearrange the isisd northbound callbacks as following: * isis_nb.h: prototypes of all northbound callbacks. * isis_nb.c: definition of all northbound callbacks and their associated YANG data paths. * isis_nb_config.c: implementation of YANG configuration nodes. * isis_nb_state.c: implementation of YANG state nodes. * isis_nb_notifications.c: implementation of YANG notifications. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #5197 from SumitAgarwal123/BFD_ADMIN_DOWNRafael Zalamena2019-10-291-1/+2
|\ | | | | bfdd: Handling local and remote admin-down
| * bfdd: Handling local and remote admin-downSumitAgarwal1232019-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scenarios where this code change is required: 1. BFD is un-configured from BGP at remote end. Neighbour BFD sends ADMIN_DOWN state, but BFD on local side will send DOWN to BGP, resulting in BGP session DOWN. Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. 2. BFD is un-configured from BGP or shutdown locally. BFD will send state DOWN to BGP resulting in BGP session DOWN. (This is akin to saying do not use BFD for BGP) Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. Signed-off-by: Sayed Mohd Saquib sayed.saquib@broadcom.com
* | isisd: Correct missing advertisement of TE param.Olivier Dugeon2019-10-211-31/+10
| | | | | | | | | | | | | | | | | | | | | | Traffic Engineering parameters are correctly advertised in LSP when 'mpls-te on' CLI command is present in the startup config file. However, if IS-IS is started without TE enable at startup and 'mpls-te on' command is issued after, TE link parameters are never announced. The patch correct this issue. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | isisd: Fix handling of neighbor circuit id in three way handshakeChristian Franke2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 5303 states: If the system ID and Extended Local Circuit ID of the neighboring system are known (in adjacency three-way state Initializing or Up), the neighbor's system ID SHALL be reported in the Neighbor System ID field, and the neighbor's Extended Local Circuit ID SHALL be reported in the Neighbor Extended Local Circuit ID field. There is nothing written about only setting the Extended circuit ID of the adjacency only when we bring the three-way adjacency up. In fact, we should always update it, to avoid the problem described in #4783. Fixes: #4783 Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #5009 from donaldsharp/interface_deletionRuss White2019-09-304-81/+51
|\ \ | | | | | | lib, zebra: Allow for interface deletion when kernel event happens
| * | *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-192-27/+10
| | | | | | | | | | | | | | | | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | *: Convert interface_down to interface down callbackDonald Sharp2019-09-192-19/+7
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | *: Convert from ->interface_up to the interface callbackDonald Sharp2019-09-192-15/+2
| | | | | | | | | | | | | | | | | | | | | For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | *: Switch all zclient->interface_add to interface create callbackDonald Sharp2019-09-194-20/+10
| | | | | | | | | | | | | | | | | | | | | Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | isisd: circuit is derefed in every code pathDonald Sharp2019-09-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | No need to check for circuit being null, we have already de-refed it in every code path and would have crashed before this point if it was. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #5040 from opensourcerouting/isisd-fix-validation-crashDonald Sharp2019-09-241-2/+2
|\ \ \ | | | | | | | | isisd: fix crash during candidate validation
| * | | isisd: fix crash during candidate validationRenato Westphal2019-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "abort_if_not_found" parameter of nb_running_get_entry() should be set to true only when this function is called during the NB_EV_APPLY phase of a northbound callback. Failure to respect this can lead to crashes when multiple configuration changes are being committed at the same time. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | | isisd, yang: implement interface countersRenato Westphal2019-09-234-6/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new "event-counters" grouping is almost a 1:1 copy of the same grouping from the IETF IS-IS module, except for the "lan-dis-changes" leaf which was skipped (more work needs to be done to support it). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | | isisd, yang: implement read-only list of adjacenciesRenato Westphal2019-09-231-13/+229
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | The new "adjacency-state" grouping is almost a 1:1 copy of the same grouping from the IETF IS-IS module, except for the "usage" and "lastuptime" leafs that were skipped (more work needs to be done to support those). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | Merge pull request #4529 from donaldsharp/vrf_conversionsRenato Westphal2019-09-203-3/+5
|\ \ \ | |/ / |/| | Vrf conversions
| * | isisd: Add vrf_id to the main isis structureDonald Sharp2019-09-103-3/+5
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Revert "lib: introduce a read-write lock for northbound configurations"Renato Westphal2019-09-181-59/+52
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | isisd: Update TLVs processing for TE, RI & SROlivier Dugeon2019-09-1713-1363/+1645
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | isisd: fix validation of prefix-sid flagsRenato Westphal2019-09-171-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | isisd: introduce new route update hookRenato Westphal2019-09-172-7/+21
| | | | | | | | | | | | | | | | 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>
* | isisd: move management of route flags out of isis_zebra.cRenato Westphal2019-09-173-29/+39
| | | | | | | | | | | | | | | | 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>
* | isisd: remove leftover from old dict codeRenato Westphal2019-09-171-1/+0
|/ | | | | | This is unnecessary since commit 4bef0ec4fbe was merged. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Enabling build with opensslMichal Ruprich2019-09-041-0/+18
| | | | | | | Similar to PR #4677, I am enabling the openssl library for md5 authentication in IS-IS Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
* Merge pull request #4874 from manuhalo/fix_isis_mtuDonald Sharp2019-09-041-19/+54
|\ | | | | isisd: check MTU when configuring circuit
| * isisd: check MTU when configuring circuitEmanuele Di Pascale2019-08-271-19/+54
| | | | | | | | | | | | | | | | | | | | | | as part of the 'ip router isis TAG' command we were not validating the MTU of the interface against the minimum LSP MTU of the area. This could cause an assertion when the circuit is created in the APPLY phase. Fixes issue #4825 Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | *: frr_elevate_privs -> frr_with_privsDavid Lamparter2019-09-033-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | isisd: fix northbound circuit deletionEmanuele Di Pascale2019-09-021-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | circuit deletion was being enforced by sending a fake IF_DOWN_FROM_Z event for the circuit interface. This created a problem when the circuit was enabled again, since isisd internal state machine was expecting to see an IF_UP_FROM_Z that never came, as the interface had not actually gone down. As a consequence, disabling + re-enabling isis on an interface or area would leave interfaces in a CONFIG state, and adjacencies were not restored. Fix this by following the state machine and simply disabling circuits rather than attempting to delete them forcefully. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | Merge pull request #4794 from opensourcerouting/isis_nexthop_v4v6Donald Sharp2019-08-307-203/+124
|\ \ | | | | | | isisd: reduce IPv4/IPv6 code duplication
| * | isisd: unify isis_nexthop and isis_nexthop6 into a single structRenato Westphal2019-08-217-191/+123
| | | | | | | | | | | | | | | | | | | | | This unification allows us to write code that works for both IPv4 and IPv6, reducing duplication. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | isisd: reuse the nexthop lookup functions to avoid code duplicationRenato Westphal2019-08-211-24/+19
| | | | | | | | | | | | | | | | | | Nothing special here. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | isisd: remove unnecessary null checksRenato Westphal2019-08-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | These null checks don't make sense because a) these two functions are never called with a NULL IP address and b) the same pointers are dereferenced later without any protection. Remove these NULL checks to make the code less confusing. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>