Commit Graph

171 Commits

Author SHA1 Message Date
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
Subbaiah Venkata
e38e0df01a isisd: couple of bug fixes 2012-04-07 13:54:37 -07:00
Josh Bailey
3f045a0881 isisd: add Google's changes to IS-IS 2012-04-07 13:54:37 -07:00
Jeremy Jackson
ec5e42b3c5 [cleanup] convert bzero() deprecated by POSIX to memset()
autoscan 2.62 complains about bzero(), so a good fix
nowadays is to just replace it.
2009-06-19 15:03:31 +01:00
Jingjing Duan
6a270cd93d [ospfd/isisd] Switch to lib/ Fletcher checksum, fixing bug in isisd
2008-08-13 Jingjing Duan <Jingjing.Duan@sun.com>

	* ospfd/: Remove the old checksum implementation and
	  use the consolidated version.
	* isisd/: ditto, thus fixing isisd checksuming on big-endian.

Signed-off-by: Paul Jakma <paul@quagga.net>
2008-08-22 19:52:57 +01:00
Paul Jakma
41b36e9013 [isisd] Fix compiler warnings and allow v4-only compilation
2006-12-08 Hannes Gredler <hannes@gredler.at>

	* isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument.
	* isis_pdu.c: (various) Update calls to isis_new_adj() to pass
	  NULL and use default.
	* (general) Add forward declarations where required.
	  Fix up const char *'s.
	  Allow V4-only compilation.
2006-12-08 01:09:50 +00:00
paul
77b1cffe3b [isisd] remove includes of common system headers.
2005-11-20 Paul Jakma <paul.jakma@sun.com>

        * (general) remove includes of very common system headers,
          these are already picked up by zebra.h. Further, including
          them before zebra.h messes up all our lovely (sarcasm)
          autoconf'd detecting of platform specific things. Recent
          addition of stdint.h to configure.ac and zebra.h appears
          particularly to throw up this problem.
2005-11-20 02:15:50 +00:00
hasso
3fdb2dd9dd * *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.
Replace XMALLOC + memset with XCALLOC. Fix some indentation issues.
	  The only really significant change is simplified isis_delete_adj
	  function in isis_adjacency.c.
2005-09-28 18:45:54 +00:00
hasso
d3d7474ba9 * isis_dynh.c, isisd.h: Implement dynamic hostname cache cleanup.
* isis_lsp.c: Refresh dynamic hostname in the cache while refreshing
	  topology LSP.
2005-09-28 18:30:51 +00:00
hasso
9551eea446 * isis_lsp.c: Make topology generator generate TE TLVs if necessary.
Also take care of inserting dynamic hostname of topology TLVs into
	  cache.
2005-09-28 18:26:25 +00:00
hasso
309ddb199a * isis_lsp.c: Put correct metric info into TE TLV's. Wide metric is
used only if only wide metric style (extended TLV's) is in use.
2005-09-26 18:06:47 +00:00
hasso
81ad8f6a10 * isis_tlv.[ch]: New function tlv_add_in_addr() to put just one IPv4
address into TLV. Used for IPv4 address TLV (in case of LSP) and TE
	  router ID TLV.
	* isis_lsp.c: Use tlv_add_in_addr() and include router ID in LSP.
2005-09-26 17:58:24 +00:00
hasso
aa4376ec0c * isis_lsp.c: Support for originating TE IS and IPv4 TLV's. No any sub
TLV handling yet.
2005-09-26 17:39:48 +00:00
hasso
f06834b805 * isis_lsp.c, isis_pdu.c, isis_spf.c: Remove some old unused code. 2005-09-19 10:44:04 +00:00
hasso
96e30387f1 * isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4
reachibility metric display.
2005-09-19 06:35:47 +00:00
hasso
f1082d1934 * isis_lsp.h: Added backpointer to the area from LSP. For now it's used
only in generated topology LSPs.
	* isisd.[ch]: Cleanup CLI commands related to topology generation and
	  added command to specify base fo dynamic hostname for topology LSPs.
	* isis_lsp.c: Rewrite almost all code related to generation topology
	  LSPs (top_lsp_refresh(), generate_topology_lsps() and
	  build_topology_lsp_data() functions). Topology is connected to own
	  LSP now (lsp_build_nonpseudo). Commented out lsppdu_realloc
	  functions, it's not used any more hopefully.

	Topology generation feature is actually useful now.
2005-09-19 04:23:34 +00:00
hasso
4eda93ab0b * isis_lsp.c (lsp_update): Fix previous commit - manipulate the right
database and only if LSP is really in the database (sanity check).
2005-09-18 17:51:02 +00:00
hasso
a96d8d1095 * isis_lsp.c (lsp_update): Remove LSP from database before updating
its data and put it back after. Database entry MUST contain at least
	  correct pointers to the sysid to get correct compare results.
	* isis_lsp.[ch], isis_pdu.c: Pass level to the lsp_update() function.
2005-09-16 14:44:23 +00:00
hasso
c89c05dd04 * *.c: Try to be less verbose by default (without any debug options
on).
	* isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of
	  touching endp directly.
	* isis_lsp.c (lsp_build_pseudo): Ditto.
2005-09-04 21:36:36 +00:00
hasso
c0fb2a5215 * isis_lsp.c: Yet another regression introduced by stream cleanup.
Similar fix to the one commited to lsp_build_nonpseudo() some days
	  ago.
2005-09-03 16:29:40 +00:00
hasso
be7d65d976 * isis_lsp.c: Less TLV leaking. 2005-09-02 01:38:16 +00:00
hasso
aac372f4f5 * isis_adjacency.c, isis_lsp.c, isisd.c: Replace XMALLOC && memset
with XCALLOC.
	* isis_lsp.c (lsp_build_pseudo): Fix adding ES neighbour.
	* isis_tlv.c: More compact free_tlvs() function.
	* isis_lsp.c (lsp_build_nonpseudo) : Try to fix one more regression
	  introduced by stream cleanup. Seek enp to the right place before
	  starting to fill stream with TLVs.
2005-09-01 17:52:33 +00:00