Commit Graph

113 Commits

Author SHA1 Message Date
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