summaryrefslogtreecommitdiffstats
path: root/isisd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: fix display of "isis bfd" in the running configurationRenato Westphal2020-04-234-6/+11
| | | | | | | | | | | | | | Since this command is modeled using YANG, it's already displayed as part of the call to nb_cli_show_dnode_cmds(). Calling the 'isis_circuit_config_write' hook was only making that command to be displayed twice. The aforementioned hook is still necessary for fabricd, which wasn't converted to the new northbound model yet. Fixes #6281. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #6251 from opensourcerouting/cs-ignoreDonald Sharp2020-04-201-1/+2
|\ | | | | *: make coverity scan ignore random() calls
| * *: replace all random() callsRafael Zalamena2020-04-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | Replace all `random()` calls with a function called `frr_weak_random()` and make it clear that it is only supposed to be used for weak random applications. Use the annotation described by the Coverity Scan documentation to ignore `random()` call warnings. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | isisd: Prevent use after free for isis_adj_state_changeDonald Sharp2020-04-185-58/+59
|/ | | | | | | | When we call isis_adj_state_change with ISIS_ADJ_DOWN we free the pointer, but we were still using the pointer after it was freed. Cleanup the api to prevent this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #6247 from FRRouting/nb_conversionsDonald Sharp2020-04-171-0/+1
|\ | | | | Merge nb_converions branch to master
| * *: include vrf northbound module in initChirag Shah2020-04-161-0/+1
| | | | | | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-162-2/+12
| | | | | | | | | | | | | | And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: move CLI parent data to cmd_node->parent_nodeDavid Lamparter2020-04-162-0/+2
| | | | | | | | | | | | | | Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: remove second parameter on install_node()David Lamparter2020-04-162-9/+11
| | | | | | | | | | | | | | | | | | | | There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: remove cmd_node->vtyshDavid Lamparter2020-04-162-3/+0
| | | | | | | | | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: clean up cmd_node initializersDavid Lamparter2020-04-162-3/+13
|/ | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #6181 from volta-networks/fix_isisd_no_metric_styleRenato Westphal2020-04-121-16/+2
|\ | | | | isisd: fix two 'no X' commands
| * isisd: fix two 'no X' commandsEmanuele Di Pascale2020-04-071-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | for some reason, when issuing a 'no metric-style' command we were setting the metric-style to narrow, even though the default is actually wide. Use NULL to avoid similar problems in the future. Likewise, the 'no is-type' command was still trying to implement the old logic of applying a different default for the first area. In practice this had no effect because the value would now be the same in both cases, but it's better to remove useless code anyway. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | isisd, yang: unified lsp-timers commandEmanuele Di Pascale2020-04-065-96/+167
|/ | | | | | | | | | | | | | | | | | | Yang constraints enforced by the northbound callbacks require that the maximum lifetime be >= than (refresh interval + 300). When we are moving from one config to another through frr-reload.py, we issue a number of vtysh -c commands ('no lsp-refresh-interval level-1 500', 'no max-lsp-lifetime level-1 1000'), which reset these parameters to their default values, respectively 900 and 1200. Depending on the actual values in the current config, the order in which these commands are sent might be the wrong one, in that we hit an invalid intermediate state and make vtysh (and by extension frr-reload.py) return an error. As a workaround, let's add a one-liner command that sets all these inter-related parameters in one go, and make isisd display them as a single line too, so that the diff will be computed as a single command. The old individual commands are kept to ensure backwards compatibility. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* *: use the current project name (FRRouting)Lou Berger2020-03-256-6/+6
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* isisd: fix hello cmds vtysh outputEmanuele Di Pascale2020-03-251-4/+4
| | | | | | | | | once again, for both hello-multiplier and hello-interval the order in which the number and level were shown in the cli_show methods was inverted compared to the vtysh command, which created issues with frr-reload.py. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #6087 from opensourcerouting/log-kill-tabsDonald Sharp2020-03-252-5/+3
|\ | | | | *: remove tabs and linefeeds from log messages
| * *: remove line breaks from log messagesDavid Lamparter2020-03-241-1/+1
| | | | | | | | | | | | | | | | Line break at the end of the message is implicit for zlog_* and flog_*, don't put it in the string. Mid-message line breaks are currently unsupported. (LF is "end of message" in syslog.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * *: remove tabs from log messagesDavid Lamparter2020-03-241-4/+2
| | | | | | | | | | | | | | Some logging systems are, er, "allergic" to tabs in log messages. (RFC5424: "The syslog application SHOULD avoid octet values below 32") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd, isisd, lib: Make key values const for skiplistDonald Sharp2020-03-242-6/+6
|/ | | | | | Make some key values const for the skiplist code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: Expand send/receive buffers to allow for larger mtuDonald Sharp2020-03-212-2/+2
| | | | | | | | | | | | | User is reporting: 2020/03/21 03:12:36 ISIS: isis_send_pdu_bcast: sock_buff size 8192 is less than output pdu size 9014 on circuit em0 2020/03/21 03:12:36 ISIS: [EC 67108865] ISIS-Adj (1): Send L2 IIH on em0 failed MTU's can frequently hit 9k in size, we have buffer limits that prevent this from being fully used and creating errors. Modify the code to allow for up to 16k mtu Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: fix vty show isis metricEmanuele Di Pascale2020-03-201-2/+2
| | | | | | | | | | | | | | | the vtysh command to set the isis metric on an interface is 'isis metric level-1 X', but when showing the running config we were displaying it as 'isis metric X level-1'. This would confuse frr-reload.py when attempting to apply a config file populated with the correct command; on the other hand, using the show command format would return an error when running vtysh -C on the file. Fix this by making the show command return the same format as the vtysh setting command. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #5927 from mjstapp/interval_string_apiDonald Sharp2020-03-172-26/+8
|\ | | | | lib, *: add a common time interval formatting api
| * lib, *: add a common time interval formatting apiMark Stapp2020-03-092-26/+8
| | | | | | | | | | | | | | | | Add a common api that formats a time interval into a string with different output for short and longer intervals. We do this in several places, for cli/ui output. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | isisd: Fix spelling mistakes found by debian packagingDonald Sharp2020-03-142-3/+3
|/ | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use gmtime_r, localtime_r exclusivelyMark Stapp2020-03-052-16/+19
| | | | | | Stop using gmtime() or localtime() everywhere. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* 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>