Commit Graph

173 Commits

Author SHA1 Message Date
Christian Franke
6f004b60ed isisd: Provide statistics over number of generated purges
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
062f4d3691 isisd: Provide statistics over number of LSP regenerations
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
86d6f80d5d isisd: Provide statistics about retransmitted LSPs
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
39bb53d67a isisd: Provide statistics about sent/received PDU count
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
eb2bcb2800 isisd: Move code to find LSP out of show database
Finding an LSP by its id is useful not only for the
`show isis database` command.

So move it out into its own function to make it reusable.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
ddb33326ff isisd: Provide better flooding debugging
Show from where LSP flooding is triggered.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-07 19:45:14 +00:00
Christian Franke
161fa356fb isisd: Add debug output for tx-queues
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>
2018-12-07 19:45:14 +00:00
Christian Franke
26687d255d isisd: Remove unused debug flags
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-08 20:30:55 +01: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
2815f817e5 isisd: Add debugging for BFD
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-10-05 14:08:23 +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
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
d4cff91a06 fabricd: add flooding algorithm debugging
Add a command `debug openfabric flooding` to allow verification of
correct operation of the OpenFabric flooding optimization algorithm.

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
b30e837b3f fabricd: run a hop-by-hop spf
OpenFabric uses an spf with the metric for all links set to one,
both for flooding optimization and for fabric locality detection.

So extend isisd's spf code to allow running it with such a metric
and have it run whenever normal spf runs.

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
Christian Franke
65f1815711 fabricd: adjust IS-IS defaults as per draft
OpenFabric specifies that it should always be run with wide metrics via
P2P links and only as Level-2. Implement this as default and remove all
the knobs from fabricd which allow other configuration.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
7c0cbd0e88 fabricd: add new daemon as build of isisd
fabricd is built using the sources of isisd. To allow differentiation
in the code, -DFABRICD=1 is added to its preprocessor flags.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:12 +02:00
Christian Franke
321c1bbb94 isisd: make spf code dst-src aware
Take the source-prefix sub-TLV into consideration when running SPF
and support creation/deletion of dst-src routes as result.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Christian Franke
be985ba059 isisd: make use of advanced concepts like arrays and loops
Have an array of spftrees instead of a separate spftree and an
spftree6 for which all the code gets duplicated.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Christian Franke
3dace42de9 isisd: move route_table into spftree
As isisd's route_tables are directly related to spf trees, move
the route tables into the spftree instead of maintaining them
alongside of the spftrees.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
paco
a2b6e694b1
bgpd isisd ldpd lib ospfd pimd: redundancy (infer)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-20 22:25:28 +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
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
Donald Sharp
b9cb7a13e8 isisd: Add a missing newline to a help string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-15 15:34:02 -05:00
Renato Westphal
efd7904eab *: add missing \n in some help strings
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-24 19:30:30 -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
Mitesh Kanjariya
09fdc88c8c Merge branch 'master' into dev-master 2017-08-28 18:19:03 -07: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
David Lamparter
a97986ffba *: fix compiler warnings
Specifically, gcc 4.2.1 on OpenBSD 6.0 warns about these;  they're bogus
(gcc 4.2, being rather old, isn't quite as "intelligent" as newer
versions; the newer ones apply more logic and less warnings.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-26 01:46:40 +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
Renato Westphal
a5fdb4c510 isisd: return proper error codes in some commands
CMD_ERR_AMBIGUOUS should only be used internally by the CLI.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-22 11:18:10 -03:00
Donald Sharp
87f6dc504d *: Add 'show debugging' command from vtysh
Allow vtysh to query every daemon about its
debugging status in one go.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-21 07:23:59 -04:00
Christian Franke
02cd317ea0 isisd: make isis_spftree non-public
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-08-03 11:45:58 +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
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
55f70b671f *: remove VTYNL, part 4 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +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
1318e7c841 *: s/VTY_NEWLINE/VTYNL/g
Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:54 +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
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
c3ea390638 isisd: ensure that MT is only used with wide metrics
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-05-06 15:50:41 +02:00
Christian Franke
064f48967b isisd: add MT configuration
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
David Lamparter
505e50567f *: apply DEFUN_NOSH for node-switch CLI commands
These have copies in vtysh that do the node-switch locally and are
listed in extract.pl's ignore list.  The ignore list however is
redundant since DEFUN_NOSH does the same thing...

ldpd is a bit hacky, but Renato is reworking this anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-28 15:48:07 -04:00
Stephane Litkowski
03f7e182af isisd: add support for draft-ietf-rtgwg-backoff-algo
Adds CLI command "spf-delay-ietf" to area node for configuration
and "show isis spf-delay-ietf" to enable node for displaying status.
2017-02-22 17:13:17 +01: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
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
Donald Sharp
3b14d86eed Merge remote-tracking branch 'origin/stable/2.0' 2017-01-06 09:58:21 -05:00
Christian Franke
4fedc05c88 isisd: don't generate LSPs with LSP-ID zero on is-type change
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-01-05 20:22:31 +01:00
David Lamparter
5304ba7e56 *: kill useless if(...) after VTY_DECLVAR_CONTEXT
VTY_DECLVAR_CONTEXT already contains a NULL check, vty warning message
and return statement.  These are not needed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-09 17:50:01 +01:00
Quentin Young
0b11464604 Merge remote-tracking branch 'osr_private_quagga/queue/osr/vtysh-generic' into vtysh-grammar 2016-12-02 19:02:06 +00:00
Quentin Young
3a2d747c2e all: Fix all underfull doc strings
Additionally:
* Add [ip] to a couple bgp show commands
* Quick refactor of a couple ISIS commands
* Quick refactor of a couple OSPF6 commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-11-29 23:07:11 +00:00
David Lamparter
82992fed8c Merge branch 'vtysh-grammar'
Conflicts:
	isisd/isisd.c
	lib/Makefile.am
	lib/thread.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 17:56:29 +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
David Lamparter
3c3877cd7d *: fix some licensing SNAFUs
bgpd/bgpd.c had a typo
zebra/zebra_mpls_netlink.c was derived from rt_netlink.c
isisd/include-netbsd/* are not needed (2 constants moved over)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:27:08 +09:00
Quentin Young
d7fa34c1bc all: Fix underfull doc strings, part 2
Add missing docstrings and separating \n.
Also eat some low-hanging refactoring fruit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-11-08 01:46:04 +00:00
Quentin Young
16cedbb01f all: Fix underfull doc strings, part 1
Add missing docstrings and separating \n.
Also eat some low-hanging refactoring fruit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-11-04 23:03:03 +00:00
Quentin Young
e52702f29d Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	bgpd/bgp_route.c
	bgpd/bgp_routemap.c
	bgpd/bgp_vty.c
	isisd/isis_redist.c
	isisd/isis_routemap.c
	isisd/isis_vty.c
	isisd/isisd.c
	lib/command.c
	lib/distribute.c
	lib/if.c
	lib/keychain.c
	lib/routemap.c
	lib/routemap.h
	ospf6d/ospf6_asbr.c
	ospf6d/ospf6_interface.c
	ospf6d/ospf6_neighbor.c
	ospf6d/ospf6_top.c
	ospf6d/ospf6_zebra.c
	ospf6d/ospf6d.c
	ospfd/ospf_routemap.c
	ospfd/ospf_vty.c
	ripd/rip_routemap.c
	ripngd/ripng_routemap.c
	vtysh/extract.pl.in
	vtysh/vtysh.c
	zebra/interface.c
	zebra/irdp_interface.c
	zebra/rt_netlink.c
	zebra/rtadv.c
	zebra/test_main.c
	zebra/zebra_routemap.c
	zebra/zebra_vty.c
2016-10-17 23:36:21 +00:00
Donald Sharp
0b1442e37b *: Consolidate all double VIEW_NODE and ENABLE_NODE's
If a command is put into the VIEW_NODE, it is going into the
ENABLE_NODE as well.  This is especially true for show commands.
As such if a command is in both consolidate it down to VIEW_NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-10-07 21:05:06 -04:00
David Lamparter
8ff5a39992 isisd: use qobj for vty->index context position
This converts all uses of vty->index over to qobj.  With this, isisd now
supports concurrent configuration editing as there are no more unsafe
references held anywhere while in config-edit mode.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-10-07 09:09:52 -04:00
David Lamparter
676a4ea3ed isisd: qobj: register everything
Wire up all neccessary isisd first-class objects to be able to use qobj
safe-pointers on them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-10-07 09:09:51 -04:00
Daniel Walton
8749a04cc2 ospf6d: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-30 13:39:56 +00:00
Daniel Walton
67656e9b65 all: added CHECK ME for DEFUNs that look at argc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-29 17:48:57 +00:00
Daniel Walton
b44c509a14 isisd: resolve CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-27 04:26:43 +00:00
Daniel Walton
ba4c5c8307 isisd: add 'int idx_foo' argv index variables
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 19:50:58 +00:00
Daniel Walton
6147e2c694 convert <1-255> to (1-255), ()s to <>s, etc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 13:47:20 +00:00
Daniel Walton
f412b39a33 ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 03:55:26 +00:00
Daniel Walton
b823bd432c isisd: argv update
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 01:07:05 +00:00
Daniel Walton
66c1ec097e Revert "isisd: Make work under new regime"
This reverts commit 38c2499873.
2016-09-22 18:21:30 +00:00
Donald Sharp
38c2499873 isisd: Make work under new regime 2016-09-20 23:46:23 -04:00
Donald Sharp
49d41a26c6 isisd, lib, vtysh: Allow extract.pl to fully work
The regular expression for finding DEFUN/ALIAS in
extract.pl looks for "DEFUN (" or "ALIAS (" if
the *.c file does not have this then it will just
silently ignore the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-17 07:25:35 -04:00
Donald Sharp
fdc7ce4a2f isisd: Remove duplicate "no debug isis lsp-gen"
The code for 'no debug isis lsp-gen' is in
isisd.c twice.  No need for this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-16 22:21:29 -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
ab1f20e607 isisd: fold up isis_circuit_is_type_set()
see previous commit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-08-16 16:06:48 +02:00
Christian Franke
9093b23046 isisd: API: area (L1), domain (L2) passwords
Last isisd CLI cleanup for now.  This also folds L1 & L2 configs into
common functions, reducing CLI function bloat by a bit.

(This patch contains changes authored by both Christian Franke and David
Lamparter.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-28 11:08:49 -04:00
Christian Franke
466ed4061d isisd: API: timers (LSP, SPF)
See previous commits...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-28 11:08:49 -04:00
Christian Franke
6754fc6650 isisd: API: LSP-MTU & area level
Yet more CLI functions in isis_vty.c using more nice setters.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-28 11:08:49 -04:00
Christian Franke
a38a72db2c isisd: API: basic area config
Move out basic area configuration (metric type, overload and attachment
bits, dynamic hostname extension enable) into isis_vty.c.

[v2: moved stuff back here that accidentally was in the previous patch]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-28 11:08:48 -04:00
David Lamparter
8f2c16aab0 *: use long long to print time_t
Since we can't assume time_t to be long, int, or even long long, this
consistently uses %lld/long long (or %llu/unsigned long long in a few
cases) to print time_t/susecond_t values.  This should fix a bunch of
warnings, on NetBSD in particular.

(Unfortunately, there seems to be no "PRId64" style printing macro for
time_t...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242)
2016-05-29 21:08:04 -04:00
David Lamparter
010e1aa65e *: remove stray extra semicolons
Some places had extra semicolons where none belong.  Remove them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b7d5021bfa161f797cbfb1e92bf5b94327fb1b71)
2016-05-26 15:25:14 +00:00
Christian Franke
be2fdb5107 isisd: ignore unknown interfaces when adjusting IS-IS mtu
For example during startup of isisd, the MTU of interfaces is not
known, since this information will only be available once the
interfaces have been learned from zebra.

It makes no sense to include the MTU 0 that is stored for interfaces
in this state in the consideration whether a new lsp-mtu for an
area is valid, so skip interfaces which are in this state.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
2016-04-06 08:07:09 -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
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
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
Donald Sharp
91283e7641 isisd: isisd-warnings.patch
Remove compile warnings for the isisd directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2015-05-19 18:29:15 -07:00
Donald Sharp
16286195e4 Overhual BGP debugs
Summary of changes
- added an option to enable keepalive debugs for a specific peer
- added an option to enable inbound and/or outbound updates debugs for a specific peer
- added an option to enable update debugs for a specific prefix
- added an option to enable zebra debugs for a specific prefix
- combined "deb bgp", "deb bgp events" and "deb bgp fsm" into "deb bgp neighbor-events". "deb bgp neighbor-events" can be enabled for a specific peer.
- merged "deb bgp filters" into "deb bgp update"
- moved the per-peer logging to one central log file. We now have the ability to filter all verbose debugs on a per-peer and per-prefix basis so we no longer need to keep log files per-peer. This simplifies troubleshooting by keeping all BGP logs in one location.  The use
r can then grep for the peer IP they are interested in if they wish to see the logs for a specific peer.
- Changed "show debugging" in isis to "show debugging isis" to be consistent with all other protocols.  This was very confusing for the user because they would type "show debug" and expect to see a list of debugs enabled across all protocols.
- Removed "undebug" from the parser for BGP.  Again this was to be consisten with all other protocols.
- Removed the "all" keyword from the BGP debug parser.  The user can now do "no debug bgp" to disable all BGP debugs, before you had to type "no deb all bgp" which was confusing.

The new parse tree for BGP debugging is:

deb bgp as4
deb bgp as4 segment
deb bgp keepalives [A.B.C.D|WORD|X:X::X:X]
deb bgp neighbor-events [A.B.C.D|WORD|X:X::X:X]
deb bgp nht
deb bgp updates [in|out] [A.B.C.D|WORD|X:X::X:X]
deb bgp updates prefix [A.B.C.D/M|X:X::X:X/M]
deb bgp zebra
deb bgp zebra prefix [A.B.C.D/M|X:X::X:X/M]
2015-05-19 17:58:12 -07:00
Christian Franke
478c1125cf isisd: verify metrics on metric-style transition
When switching to metric-style transition, circuit metrics should also be
verified to be in the narrow range 0..63.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:38:08 +01:00
Christian Franke
4fb7c84f1b isisd: fix metrics check for metric-style narrow
When switching to narrow metric style, all configured circuits are
verified to have a valid narrow style metric. Check te_metric instead
of metric_default as the latter is only 8bit wide and may overflow for
wide style metrics.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:38:08 +01:00
Christian Franke
f818c8f3fb isisd: save metric-style narrow
isisd defaults to wide metric style. So if narrow metric style is
configured, a matching setting should be written to the configuration,
allowing a narrow metric-style setting to be saved.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:38:07 +01: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
Stephen Hemminger
7fc626de5f [cleanup] Make command nodes static
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).
2009-06-12 17:10:29 +01:00
Paul Jakma
c7350c4846 [isisd] Bug #437: fix ssert caused by bad list management
2008-01-29 James Carlson <james.d.carlson@sun.com>

	* Fix bug #437, assert due to bogus index management
	* isis_flags.c: (flags_initialize) new
	* (flags_get_index) fix off by one, leading to list assert
	  on null node data.
	  (flags_free_index) ditto.
	* isisd.c: (isis_area_create) use flags_initialize
	  (isis_area_destroy) deconfigure circuits when
	  taking down area.
2008-01-29 19:29:44 +00: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