summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* *: remove useless return variablesQuentin Young2019-02-261-8/+4
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use proper bool initializers & fix comparisonsQuentin Young2019-02-261-2/+2
| | | | | | | - bools should be initialized with true/false - bools do not need to be compared Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: implemented the 'own-lsp-purge' notificationEmanuele Di Pascale2018-12-181-0/+7
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implemented the 'sequence-number-skipped' notificationEmanuele Di Pascale2018-12-181-0/+15
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: add the 'lsp-error-detected' notificationEmanuele Di Pascale2018-12-181-0/+11
| | | | | | | | | | | | Note that we do not return the actual tlv_type and offset of the erroneous TLV. This is because unpacking tlvs currently uses a chain of function calls, where the notification can only be sent at the start of the chain, but the tlv_type and offset information are only available at the end. Unless we change the code to propagate those values, we have no way to feed them to the notification. So these leafs are not generated. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'version-skew' notificationEmanuele Di Pascale2018-12-181-0/+8
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'id-len-mismatch' notificationEmanuele Di Pascale2018-12-181-0/+4
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'lsp-received' notificationEmanuele Di Pascale2018-12-181-0/+6
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'area-mismatch' notificationEmanuele Di Pascale2018-12-181-0/+8
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'rejected-adjacency' notificationEmanuele Di Pascale2018-12-181-1/+45
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the authentication failure notificationsEmanuele Di Pascale2018-12-181-10/+64
| | | | | | | | | the original isisd code did not distinguish between authentication_failure and authentication_type_failure, so additional code had to be added to differentiate between the two and to return the raw_pdu as requested by the IETF YANG model. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement 'max-area-addresses-mismatch' notificationEmanuele Di Pascale2018-12-181-0/+12
| | | | | | | | | | | Note that the original IETF YANG model also included a requirement to throttle such notifications so that they would not be sent more often than once every 5 seconds. I did not implement any throttling mechanism yet, mostly because I am not sure whether this limit should apply to the entire isis daemon, to each area, to each neighbor etc. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'lsp-too-large' notificationEmanuele Di Pascale2018-12-181-0/+5
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Minor adjustments to address CI warningsRodny Molina2018-12-121-9/+12
|
* isisd: Provide statistics about sent/received PDU countChristian Franke2018-12-071-12/+29
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: make triggered csnp delay configurableChristian Franke2018-12-071-3/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: Improve LSP flooding logChristian Franke2018-12-071-6/+15
| | | | | | | Also track when we received an LSP as do not reflood, as well as the time when we last considered flooding it. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Add debug output for tx-queuesChristian Franke2018-12-071-4/+7
| | | | | | | To allow easier debugging of LSP transmission scheduling, add a debug mode where all tx-queue insertions/deletions are logged. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: add send_hello_sched functionChristian Franke2018-12-041-10/+50
| | | | | | | Add a function send_hello_sched so that the logic for scheduling a hello is not replicated inconsistently into different locations. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: reduce code duplication for levelsChristian Franke2018-12-041-59/+32
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Revert "isisd lib ospfd pbrd python: fix empty init"David Lamparter2018-12-011-3/+3
| | | | | | | | | This reverts commit 48944eb65e1d1ced03d46121d923d9d613a480d5. We're using GNU C, not ISO C - and this commit triggers new (real) warnings about {0} instead of bogus ones about {}. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #3368 from pacovn/static_analysis__ISO_C_empty_initializerRenato Westphal2018-11-211-3/+3
|\ | | | | isisd lib ospfd pbrd python: fix empty init
| * isisd lib ospfd pbrd python: fix empty initF. Aragon2018-11-211-3/+3
| | | | | | | | | | | | | | ISO C forbids empty initializer braces. Empty initializers have been replaced with {0} Signed-off-by: F. Aragon <paco@voltanet.io>
* | isisd: Fix behavior on reception of self-originated LSPChristian Franke2018-11-151-5/+12
|/ | | | | | | | | | We should only update and reflood our own LSPs when the received LSP is newer than the local copy. In all other cases, we should simply acknowledge it or resend our own LSP. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: style for EC replacementsQuentin Young2018-09-131-24/+24
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-131-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: ISIS_[ERR|WARN] -> EC_ISISQuentin Young2018-09-131-13/+13
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* bgpd isisd ospf6d ospfd: variable shadowing fixesF. Aragon2018-09-121-2/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* fabricd: add support for completely unnumbered operationChristian Franke2018-09-051-3/+7
| | | | | | | | | | | | | | With this commit, fabricd can run without any IPv4 addresses configured except on loopback. There are two changes to achieve this: a) If a circuit has no IPv4 address configured, fabricd will resort to advertise the routers loopback IP in the OpenFabric hellos. b) All the routes from OpenFabric are sent with ZEBRA_FLAG_ONLINK set, so that zebra will install them into the fib without checking whether the nexthop is reachable Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: trigger CSNP after flooding scope LSP has been receivedChristian Franke2018-09-051-1/+13
| | | | | | | Have fabricd send out a CSNP whenever a circuit scoped LSP is received, and log a warning if the CSNP showed resynchronization was necessary. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: Remove processing for unneded PDUs and TLVsChristian Franke2018-09-051-0/+6
| | | | | | | | | | | The OpenFabric draft prescribes that any IS-IS PDUs not needed for OpenFabric operation MUST be ignored. So this commit makes fabricd ignore any LAN IIHs and any L1 LSPs. Also the draft specifies that any reachabilities given as narrow-metric TLVs SHALL be ignored, so adhere to that too. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: add purge originator identification supportChristian Franke2018-09-051-1/+2
| | | | | | | Implement RFC 6232, optionally allowing to flood isisd's NET and hostname in purges it originates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: support transmission/reception of circuit-scoped LSPsChristian Franke2018-09-051-7/+42
| | | | | | | | OpenFabric makes use of flooding scope LSPs to reduce the amount of reflooding caused by the update process. Implement transmission and reception of such PDUs. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: reimplement LSP transmission logicChristian Franke2018-09-051-42/+35
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, isisd/fabricd maintained a bitfield for each LSP to track the SRM bit for each circuit, which specifies whether an LSP needs to be sent on that circuit. Every second, it would scan over all LSPs in `lsp_tick` and queue them up for transmission accordingly. This design has two drawbacks: a) it scales poorly b) it adds unacceptable latency to the update process: each router takes a random amount of time between 0 and 1 seconds to forward an update. In a network with a diamter of 10, it might already take 10 seconds for an update to traverse the network. To mitigate this, a new design was chosen. Instead of tracking SRM in a bitfield, have one tx_queue per circuit and declare that an LSP is in that queue if and only if it would have SRM set for that circuit. This way, we can track SRM similarly as we did before, however, on insertion into the LSP queue, we can add a timer for (re)transmission, alleviating the need for a periodic scan with LSP tick and reducing the latency for forwarding of updates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: adjacency formation optimization as per section 2.4Christian Franke2018-09-051-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenFabric changes IS-IS's initial database synchronization. While regular IS-IS will simultaneuously exchange LSPs with all neighboring routers during startup, this is considered too much churn for a densely connected fabric. To mitigate this, OpenFabric prescribes that a router should only bring up an adjacency with a single neighbor and perform a full synchronization with that neighbor, before bringing up further adjacencies. This is implemented by having a field `initial_sync_state` in the fabricd datastructure which tracks whether an initial sync is still pending, currently in progress, or complete. When an initial sync is pending, the state will transition to the in-progress state when the first IIH is received. During this state, all IIHs from other routers are ignored. Any IIHs transmitted on any link other than the one to the router with which we are performing the initial sync will always report the far end as DOWN in their threeway handshake state, avoiding the formation of additional adjacencies. The state will be left if all the SRM and SSN flags on the initial-sync circuit are cleared (meaning that initial sync has completed). This is checked in `lsp_tick`. When this condition occurrs, we progress to the initial-sync-complete state, allowing other adjacencies to form. The state can also be left if the initial synchronization is taking too long to succeed, for whatever reason. In that case, we fall back to the initial-sync-pending state and will reattempt initial synchronization with a different neighbor. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-141-14/+14
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: Add isis_errors and generate custom Error CodesDonald Sharp2018-08-141-28/+41
| | | | | | Generate appropriate error codes for ISIS. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: Convert to use LIB_ERR_XXXDonald Sharp2018-08-141-1/+3
| | | | | | | Where an obvious choice could be made about converting to a LIB_ERR_XXX function do so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: add debug message if adjacency is ignored because IP is unusableChristian Franke2018-08-031-1/+8
| | | | | | | | | | | isisd verifies whether the neighboring IPv4 addresses overlap with its own unless the interface is running in unnumbered mode. If no overlap is found and IPv6 is also not enabled, IIHs will be ignored. Add a debug message for this case, to avoid people wondering why adjacencies are not coming up. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-15/+15
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #1925 from opensourcerouting/bugfix-isis_bpf_readDonald Sharp2018-03-191-1/+3
|\ | | | | isisd: Fixed the way isis reads from bpf
| * isisd: Fixed the way isis reads from bpfipinlnd2018-03-191-1/+3
| | | | | | | | | | | | With this fix, we parse the bpf to process every packet read Signed-off-by: Ali Rezaee nlndipi@hotmail.com
* | isisd: add nerd-knob to turn three-way-adj offChristian Franke2018-03-101-1/+2
| | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | isisd: implement threeway adjacenciesChristian Franke2018-03-101-50/+69
| | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | isisd: cleanup usage of circuit_idChristian Franke2018-03-101-1/+1
| | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | isisd: revert some counterproductive indentationChristian Franke2018-03-101-7/+4
|/ | | | This reverts some of commit 996c93142d3abfab0f6d6c800474e22a8cfbdbc5.
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-9/+11
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* Merge pull request #1358 from opensourcerouting/isis-lsp_tick-fixesDonald Sharp2017-10-251-6/+2
|\ | | | | Isis lsp_tick fix and improve perfomance for processing LSP updates
| * isisd: fix issue with lsp queueing logic in lsp_tickChristian Franke2017-10-051-6/+2
| |