Commit Graph

192 Commits

Author SHA1 Message Date
Christian Franke
16c2ab97f9 isisd: Always consider purges as newer
When receiving an LSP with same sequence number but different
checksum as in the local database, we would always treat it as
newer than the local LSP.

That behavior is incorrect if the local LSP is indeed a purged
LSP waiting for age-out and the received one is not.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-15 15:06:40 +01:00
Olivier Dugeon
510ccb8d36
Merge pull request #3303 from opensourcerouting/bugfix/isis-fragment-retransmission
isisd: Fix issues with purged fragments
2018-11-12 17:59:50 +01:00
Donald Sharp
226e1b7b1e
Merge pull request #3305 from opensourcerouting/bugfix/isis-lsp-aggregate-time
isisd: Adjust duration until lsp is regenerated
2018-11-12 09:27:34 -05:00
Donald Sharp
059cce897a
Merge pull request #3304 from opensourcerouting/bugfix/openfabric-flooding
fabricd: never flood back through the incoming interface
2018-11-12 09:20:27 -05:00
Christian Franke
8f27aa2729 isisd: Fix issues with purged fragments
Purged fragments would always be reoriginated by isisd. They
should only be purged once and never be reoriginated.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-10 18:04:43 +01:00
Christian Franke
37212c410d fabricd: never flood back through the incoming interface
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-10 18:03:04 +01:00
Christian Franke
9337256ebf isisd: Fix lsp_build_list_nonzero_ht
When `first` would be initialized to the same value as `last`, the
function would return incorrect results.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-10 18:00:57 +01:00
Christian Franke
01c3745f56 isisd: Adjust duration until lsp is regenerated
It turns out 50ms is actually too short to aggregate all changes
in some cases, so allow for 100ms.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-09 17:14:13 +01:00
Christian Franke
f93025e1a6 isisd: delay lsp regeneration while events are still coming in
When there is a stream of events coming in, where IS-IS learns
about a lot of updates, IS-IS would regenerate its LSPs before
the updates have been processed completely.

This causes suboptimal convergence because the intermediate state
will be flooded. Only after the configured `lsp_gen_interval`, a
new update with the correct and final state will be generated.

Resolve this by holding off LSP generation while there are still
events coming in.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-24 07:53:23 +02:00
Christian Franke
9196731f9d isisd: Combine lsp_l1/l2_refresh
lsp_l1_refresh and lsp_l2_refresh are identical apart from the
hardcoded IS-IS level they are referring to. So merge them and
pass the level as part of the argument.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-24 07:52:44 +02:00
Christian Franke
691f3e768a isisd: Log LSP-update trigger source
For debugging the timing of LSP generation, it is useful to know
which event caused a regeneration to be scheduled. Therefore, add
this information to the debug log.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-24 07:51:50 +02:00
Christian Franke
d07067ba45 isisd: adjust lsp size to area->lsp_size before packing
IS-IS would ignore any area lsp-mtu setting configured after initial
creation of the LSP since move to the new tlv serialized/deserializer.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-16 19:35:54 +02:00
Christian Franke
dc84cf1494 isisd: Unlink LSP fragments from LSP0 on lsp_destroy
isisd would crash when lsp fragments aged out, since they got freed
correctly, but were not removed from LSP0's linked list of fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-16 19:35:54 +02:00
Christian Franke
a5b5e946ce isisd: Replace isis_event_adjacency_state_change with a hook
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-05 14:05:28 +02:00
F. Aragon
7968405d87
isisd: null check (Coverity 1424529)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-10-03 16:38:49 +02:00
David Lamparter
6a154c8812 *: list_delete_and_null() -> list_delete()
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-02 11:40:52 +02:00
F. Aragon
f2fcf867f5
isisd: null check (Coverity 1473285)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-09-20 15:39:00 +02:00
Quentin Young
1c50c1c0d6 *: style for EC replacements
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 19:38:57 +00:00
Quentin Young
450971aa99 *: LIB_[ERR|WARN] -> EC_LIB
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 19:34:28 +00:00
Christian Franke
2c92bee499 isisd: add purge originator identification support
Implement RFC 6232, optionally allowing to flood isisd's NET and
hostname in purges it originates.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
9d22481933 fabricd: implement flooding optimization
Regular IS-IS will flood any LSP updates out to all circuits except the
one where it was received on. This is done in `lsp_flood`.

Change `lsp_flood` for fabricd to use the optimized flooding algorithm
instead.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
9b39405f00 fabricd: reimplement LSP transmission logic
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>
2018-09-05 11:38:13 +02:00
Christian Franke
a191178d0a fabricd: implement asymmetric metric for tier 0 as per Section 6.2
To avoid passing of traffic via leaf nodes in the fabric, OpenFabric
specifies that all links towards tier 0 nodes should be advertised with
a very high metric.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
92ed0cdef5 fabricd: allow to configure tier-level advertisement
While OpenFabric calculates most tier numbers automatically by the
fabric locality calculation algorithm, that algorithm requires two
systems to be manually configured as tier 0, so it has reference points.

Also, completely manual configuration is possible.

To support this, introduce appropriate CLI commands and flood the
configured information.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
8e6fb83b4b fabricd: adjacency formation optimization as per section 2.4
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>
2018-09-05 11:38:13 +02:00
Quentin Young
af4c27286d *: rename zlog_fer -> flog_err
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Donald Sharp
54ece69899 isisd: Add isis_errors and generate custom Error Codes
Generate appropriate error codes for ISIS.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Donald Sharp
38937bd540 isisd: Convert to use LIB_ERR_XXX
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>
2018-08-14 20:02:05 +00:00
Christian Franke
d43d2df5f3 isisd: learn and advertise IPv6 dst-src routes
Receive IPv6 dst-src routes from zebra and advertise them in our LSPs
if so configured.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Quentin Young
df6e5a848e
Merge pull request #2587 from pacovn/Clang_scan_dead_code
isisd zebra: dead code (Clang scan)
2018-06-29 12:18:38 -04:00
F. Aragon
e36e5b569c
isisd zebra: dead code (Clang scan)
This correction fixes two bugs detected by Clang scan:

Bug Group: Dead store

Bug Type: Dead assignment
File: zebra/kernel_netlink.c
Function: netlink_parse_extended_ack
Line: 548

Bug Type: Dead increment
File: isisd/isis_lsp.c
Function: lsp_bits2string
Line: 625

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-29 17:47:05 +02:00
F. Aragon
c46df7876a
isisd: null check (Coverity 1424529)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-28 16:48:37 +02:00
paco
36228974c2
isisd, zebra: FIXME fixes
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-19 19:22:13 +02:00
Quentin Young
d7c0a89a3a
*: use C99 standard fixed-width integer types
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>
2018-03-27 15:13:34 -04:00
Christian Franke
44b895115e isisd: P2P adjacencies should only be included in LSPDB/SPF when they are up 2018-03-10 18:38:03 +01:00
Christian Franke
98c5bc15e7 isisd: revert some counterproductive indentation
This reverts some of commit 996c93142d.
2018-03-10 18:37:12 +01:00
Lou Berger
996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Renato Westphal
b599ec55f4 *: silence '-Wmaybe-uninitialized' warnings on NetBSD
None of these variables can actually be used before being initialized,
but unfortunately some old compilers are not smart enough to detect that.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-02-02 16:31:20 -02:00
Rafael Zalamena
c60158ae6b isisd: fix l2 neighbor formations
Add a timestamp information for level 2 circuits, otherwise if the
circuit is marked as already processed on level 1 we will not process
level 2 areas.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2017-12-13 22:57:15 -02:00
Donald Sharp
ef47f23b91 Merge pull request #1358 from opensourcerouting/isis-lsp_tick-fixes
Isis lsp_tick fix and improve perfomance for processing LSP updates
2017-10-25 09:19:06 -04:00
Christian Franke
5304211a8a isisd: lsp_update doesn't need to readd LSPs to the database anymore 2017-10-05 17:47:12 +02:00
Donald Sharp
affe9e9983 *: Convert list_delete(struct list *) to ** to allow nulling
Convert the list_delete(struct list *) function to use
struct list **.  This is to allow the list pointer to be nulled.

I keep running into uses of this list_delete function where we
forget to set the returned pointer to NULL and attempt to use
it and then experience a crash, usually after the developer
has long since left the building.

Let's make the api explicit in it setting the list pointer
to null.

Cynical Prediction:  This code will expose a attempt
to use the NULL'ed list pointer in some obscure bit
of code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-05 10:53:13 -04:00
Christian Franke
e5973ce5b6 isisd: fix issue with lsp queueing logic in lsp_tick 2017-10-05 16:02:33 +02:00
Christian Franke
58e1623702 isisd: optimize per interface lsp send-queue creation
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-10-03 14:20:30 +02:00
Christian Franke
0b8b6cab57 isisd: ensure fragments get always linked
When we receive or generate new versions of fragments which are
curently pending for age out, we need to ensure that they are correctly
linked to their lsp0.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-23 20:41:22 +02:00
Christian Franke
789c4dfc0b isisd: Don't corrupt generated LSPs if information exceeds capacity
Standard IS-IS only supports up to 256 fragments per router. Recognize
when the information we want to advertise exceeds 256 fragments and
print a warning in this case instead of overflowing the fragment counter
and overwriting existing LSP fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-22 22:17:20 +02:00
David Lamparter
14f6aefe43 Merge pull request #998 from mkanjari/dev-master
Dev master
2017-08-29 20:03:48 +02:00
Mitesh Kanjariya
6b3ee3a0b0 lib: new APIs for get/set system hostname/domainname
1. Change hostname_get to cmd_hostname_get
2. Change domainname_get to cmd_domainname_get
3. New API to set domainname
3. Provide a CLI command to set domainname

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-08-28 17:16:52 -07:00
Christian Franke
c55018ab9a isisd: keep original TLVs when purging in response to confusion
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-29 00:15:26 +02:00
Mitesh Kanjariya
419cd5a03f lib/bgpd: provide/use API to get hostname/domainname
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-08-24 16:37:16 -07:00
Christian Franke
8f5dbe1864 isisd: always link fragments to fragment #0, even when learned by CSNP
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-11 15:53:07 +02:00
Christian Franke
164066e4d9 isisd: purge LSP correctly on confusion
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:34:04 +02:00
Christian Franke
841791b65b isisd: rework complete, move "tlvs2" to "tlvs"
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:34:04 +02:00
Christian Franke
af8ac8f98f isisd: send/receive LSPs with new parser
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:34:04 +02:00
Christian Franke
17c9dcd5f1 isisd: send/receive *SNPs with new parser
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:34:04 +02:00
Christian Franke
88f9d9112a isisd: Don't use structs to encode/decode PDU header
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:34:04 +02:00
David Lamparter
9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent
c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent
d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter
6d3c2ed4ed *: remove VTYNL, part 1 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
David Lamparter
181039f3d7 *: ditch vty_outln(), part 2 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:19:58 +02:00
David Lamparter
5c7571d43f *: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13 20:29:22 +02:00
Quentin Young
e31b6333f4 *: vty_outln (vty, "") --> vty_out (vty, VTYNL)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:56 +00:00
Quentin Young
96ade3ed77 *: use vty_outln
Saves 400 lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:31:28 +00:00
Donald Sharp
b440fe5c82 Merge remote-tracking branch 'origin/stable/3.0' 2017-06-29 10:10:15 -04:00
Christian Franke
b59fee54db isisd: fix formatting in metrics when showing database 2017-06-20 22:46:41 +02:00
David Lamparter
896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Quentin Young
ffa2c8986d *: remove THREAD_ON macros, add nullity check
The way thread.c is written, a caller who wishes to be able to cancel a
thread or avoid scheduling it twice must keep a reference to the thread.
Typically this is done with a long lived pointer whose value is checked
for null in order to know if the thread is currently scheduled.  The
check-and-schedule idiom is so common that several wrapper macros in
thread.h existed solely to provide it.

This patch removes those macros and adds a new parameter to all
thread_add_* functions which is a pointer to the struct thread * to
store the result of a scheduling call. If the value passed is non-null,
the thread will only be scheduled if the value is null. This helps with
consistency.

A Coccinelle spatch has been used to transform code of the form:

  if (t == NULL)
    t = thread_add_* (...)

to the form

  thread_add_* (..., &t)

The THREAD_ON macros have also been transformed to the underlying
thread.c calls.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-09 20:44:19 +00:00
Christian Franke
c3ae312702 isisd: announce and parse MT IP reachabilities
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
Christian Franke
206f4aae58 isisd: announce and parse MT IS reachabilities
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
Christian Franke
99894f9a17 isisd: announce MT capabilities in IIH and LSP
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
Christian Franke
795c08fc9e isisd: function lsp_te_tlv_fit is never used
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
Donald Sharp
821cf0d9f6 Merge pull request #219 from opensourcerouting/feature/isis-draft-ietf-rtgwg-backoff-algo
Add support for draft-ietf-rtgwg-backoff-algo to IS-IS
2017-02-24 10:09:19 -05:00
Donald Sharp
3f3169a2e6 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-24 09:32:47 -05:00
Stephane Litkowski
5475ecf7c5 isisd: cleanup SPF scheduling
- SPF is now per level only (no more per family)
 - t_spf and pending removed from struct spftree and moved to
   spf_timer field in struct isis_area
 - show isis summary output changed to accomodate the per level SPF
 - isis_spf_schedule6 and isis_run_spf6_lx functions are removed,
   isis_run_spf_lx now calls isis_run_spf for both INET and INET6
 - lsp related functions now call isis_spf_schedule only
2017-02-22 16:18:40 +01:00
Christian Franke
f75352362c isisd: address coverity findings 2017-02-13 19:27:54 +01:00
Donald Sharp
9aa7f43f7e Merge branch 'master' into cleanup 2017-01-13 14:48:16 -05:00
Donald Sharp
56c1f7d852 frr: Remove HAVE_IPV6 from code base
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-13 08:05:50 -05:00
Christian Franke
07f2fb1374 isisd: clean up own LSPs correctly on update
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-01-06 20:21:02 +01:00
David Lamparter
095f8fae64 isisd: remove topology generator
Licensing is unclear and the tool is a testbed-only half-broken pile of
goo.  Remove.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:28:04 +09:00
boris yakubov
cd4ab724a1 isisd: Segmentation fault on isis daemon fixes
I have a fix for 2 segmentation fault scenarios on the isis daemon:
1. When running a command "isis passive" on an interface in the
following context:
"end"
"configure terminal "
"interface dummy0"
"isis passive"
The trace back collected:
isis_adjacency.c:521
family=2,
     root_sysid=0x20aee6d0 "", parent=0x20af4d68) at isis_spf.c:999
sysid=0x20aee6d0 "")
     at isis_spf.c:1217
isis_spf.c:1372
isis_lsp.c:416
isis_lsp.c:1660
isis_main.c:368

The fix location:
file name: isisd/isis_adjacency.c
routine name: isis_adj_build_up_list

2. When deleting the existing isis router instance:
"end"
"configure terminal "
"no router isis DEAD"

The fix location:
isisd/isis_events.c, routine circuit_resign_level
isisd/isis_lsp.c, routine lsp_destroy
isisd/isis_route.c, isis_route_validate

The trace back collection:
"DEAD") at isisd.c:252
argc=1, argv=0xbfc39054) at isisd.c:1520
vty=0x20d6f528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368

and

"DEAD") at isisd.c:260
argc=1, argv=0xbfd6cf54) at isisd.c:1520
vty=0x208cb528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368

The patch is included.

patchwork #833: http://patchwork.quagga.net/patch/833/
2016-09-23 12:12:16 -04:00
Olivier Dugeon
f8c06e2c52 Add support of Traffic Engineering to IS-IS
These patches is an implementation of RFC5305 that enable the
support of Traffic Engineering in IS-IS

* isisd/Makefile.am: Add new files isis_te.c and isis_te.h
* isisd/isis_circuit.[c,h]: Add new mpls_te_circuit structure to isis_circuit
structure to handle new Traffic Engineering TLVs
* isisd/isis_lsp.c: Update LSP handler to mux/demux Traffic Engineering TLVs
* isisd/isis_main.c: Add initialisation of ISIS TE
* isisd/isis_pdu.c: Update function process_p2p_hello() to retrieve remote IP
address to populate Traffic Engineering TLV.
* isisd/isis_te.[c,]: Implementation of RFC5305
* isisd/isis_tlv.[c,h]: Update TLV definition and function to handle
Traffic Engineering ones
* isisd/isis_zebra.c: Add new function isis_zebra_link_params() to retrieve
the link parameters of interfaces from ZBus to populate the Traffic Engineering
TLVs
* isisd/isisd.[c,h]: Add Traffic Engineering support with new debug command

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2016-09-03 11:05:50 -04:00
David Lamparter
47a928fb85 isisd: drop unused per-type metric values
Expense, Error and Delay metrics never quite made it into the real
world.  Either way isisd does nothing useful with them, so let's drop
them from the code.  If someone wants to implement them, this patch can
still be reverted.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-28 11:08:49 -04:00
David Lamparter
18209e2c25 isisd: assorted fixes (unused variables, static)
This just mops up a few warnings in isisd.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit f50ee93d12f8213a048a04fcf7d73e12662288e5)
2016-06-07 09:05:52 -04:00
David Lamparter
f2bce9a5b3 *: fix signedness mix-ups
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 21401f3215be26dcb0f787105f5907745498e966)
2016-06-07 08:47:49 -04:00
Donald Sharp
43691c09ba isisd: Use correct boolean operator type.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-05-19 10:41:59 -04:00
Christian Franke
0250758d15 isisd: handle lsp confusion (ISO/IEC 10589:2002 7.3.16.2)
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:32 -04:00
Christian Franke
8c8829a620 isisd: fix IPv6 mask application
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:31 -04:00
Christian Franke
f3ccedaa3e isisd: add support to import routes from other protocols
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2016-03-29 20:26:28 -04:00
Christian Franke
f3d2b2813d isisd: fix assertion in LSP refresh timer calculation
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:24 -04:00
Christian Franke
414766a1e5 isisd: add a slight delay to lsp_regenerate_schedule
isisd implements a holdoff interval and will refrain from regenerating
an lsp if the difference between the current time and its last refresh
is less than the holdoff interval. Instead, it will schedule a timer
to regenerate the lsp after the holdoff interval has passed.

This implementation has one disadvantage in the case where there is a
succession of calls to lsp_regenerate_schedule. In such a case, the
first call will trigger an immediate regeneration of the lsp, while the
other calls will only schedule the regeneration timer. This leads to
cases where it takes holdoff interval time for information to propagate,
just because the information was only available e.g. at the second call
of lsp_regenerate_schedule in such a succession of calls.

By not immediately regenerating an lsp if the last generation time
is sufficiently long ago, but instead scheduling the regeneration with a
very small delay, we allow all information from such a succession of
calls to be considered.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:24 -04:00
Christian Franke
148726446c isisd: add a debug mode that traces LSP construction
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2016-03-29 20:26:22 -04:00
Christian Franke
17baea9c4e isisd: purge on correct level
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:21 -04:00
Christian Franke
b20ccb3aa9 isisd: allow to adjust lsp-mtu
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:20 -04:00
Amritha Nambiar
7ed55a412f isisd: Attached-bit in LSP header
Set/reset attached-bit in LSP header:
    This patch provides support for set/reset attached_bit in the LSP header.
    In IS-IS networks, routing inter-area traffic from L1 areas is
    accomplished by sending the traffic to the nearest L1/L2 router.
    A L1/L2 router identifies itself by setting an attach-bit (ATT-bit) in its (LSP).

    The ATT-bit in LSP can be changed using the set-attached-bit or
    no-set-attached-bit commands (similar to ‘set-overload-bit’ and
    'no set-overload-bit’) using telnet terminal in router configuration mode.

    Steps:
    enable
    configure terminal
    router isis <Routing area>
    set-attached-bit

    V2: Removed looping through area list as this well set the bit for all
        areas in the list. This implementation now looks exactly like the
        current overload bit implementation.

    Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
2016-03-29 20:26:18 -04:00
Christian Franke
e316f9ab5a isisd: don't corrupt memory for long hostnames
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-03-29 20:26:15 -04:00
Christian Franke
d66fa22127 isisd: remove superfluous checks after XMALLOC etc.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2016-03-29 20:26:13 -04:00
Michael Zingg
4836b53749 isisd: Fix LSPs not being regenerated after adjacency change
In isisd LSP's are not regenerated after a change in adjacency if
lsp-gen-interval has expired.
I have tested this on Debian 6.0 with zebra and level1 isisd with point
to point links. This problem is also listed in Test ISIS-18.3 on the
opensourcerouting.org wiki:
http://confluence.isc.org/display/osr/ANVL+ISIS+Compliance+Test+Plan
http://confluence.isc.org/display/osr/ANVL+ISIS+Results
2016-03-29 20:26:09 -04:00
David Lamparter
e8aca32f31 isisd: address Coverity warnings
this fixes a bunch of issues found by Coverity SCAN and flagged as
"high" impact -- although, they're all rather minute issues.

* isisd/isis_adjacency.c: one superfluous check, one possible NULL deref
* isisd/isis_circuit.c: two prefix memory leaks
* isisd/isis_csm.c: one missing break
* isisd/isis_lsp.c: one possible NULL deref
* isisd/isis_pfpacket.c: one error-case fd leak
* isisd/isis_route.c: one isis_route_info memory leak
* isisd/isis_routemap.c: one... fnord
* isisd/isis_tlv.c: one infinite loop

Reported-by: Coverity SCAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:38:08 +01:00
David Lamparter
a47c5838e9 isisd: fix typo in topology generator (BZ#731)
There was a "lsp->" missing before "level" in line 2416.
(introduced by git commit e38e0df)

Reported-by: Seblu <seblu@seblu.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-06-21 09:57:54 +02:00