summaryrefslogtreecommitdiffstats
path: root/isisd/isis_events.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: replace dict_* with DECLARE_RBTREEDavid Lamparter2019-04-271-1/+0
| | | | | | | | Historically, isisd has been carrying around its own red-black tree to manage its LSP DB in. This replaces that with the newly-added DECLARE_RBTREE_*. This allows completely removing the dict_* code. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: add send_hello_sched functionChristian Franke2018-12-041-6/+1
| | | | | | | Add a function send_hello_sched so that the logic for scheduling a hello is not replicated inconsistently into different locations. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: reduce code duplication for levelsChristian Franke2018-12-041-30/+17
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Replace isis_event_adjacency_state_change with a hookChristian Franke2018-10-051-19/+0
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: ISIS_[ERR|WARN] -> EC_ISISQuentin Young2018-09-131-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-141-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: Add isis_errors and generate custom Error CodesDonald Sharp2018-08-141-3/+4
| | | | | | Generate appropriate error codes for ISIS. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-051-4/+2
| | | | | | | | | | | | | | | | | | | 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>
* isisd: send/receive LSPs with new parserChristian Franke2017-08-031-1/+0
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-192/+182
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+4
| | | | | | | | | | | 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>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-091-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: fix some licensing SNAFUsDavid Lamparter2016-11-141-1/+0
| | | | | | | | 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>
* isisd: Segmentation fault on isis daemon fixesboris yakubov2016-09-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* isisd: fold up isis_circuit_is_type_set()David Lamparter2016-08-161-1/+1
| | | | | | see previous commit. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: API: LSP-MTU & area levelChristian Franke2016-07-281-113/+0
| | | | | | Yet more CLI functions in isis_vty.c using more nice setters. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: fix crash on changing the circuit type of a passive interfaceLu Feng2016-05-261-19/+22
| | | | | | Signed-off-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 92cff4f7cd7e805e6689e73e63029aaccd145eca)
* isisd: add a slight delay to lsp_regenerate_scheduleChristian Franke2016-03-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* isisd: couple of bug fixesSubbaiah Venkata2012-04-071-26/+21
|
* isisd: add Google's changes to IS-ISJosh Bailey2012-04-071-43/+107
|
* [isisd] remove includes of common system headers.paul2005-11-201-3/+0
| | | | | | | | | | | 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.
* * isis_adjacency.c: Stop expire timer while deleting adjacency.hasso2005-10-011-0/+1
| | | | | | | | | | * isis_events.c: Stop pseudo LSP thread while resigning circuit from level. * isis_route.c: Fix compiling with EXTREME_DEBUG. Mark route as not in sync with zebra if it's changed. * isis_spf.c: Schedule route validating etc even if tent was empty. It's probably because we just don't have any adjacencies. * isisd.c: Write minimum spf interval into configuration.
* * *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.hasso2005-09-281-2/+2
| | | | | | Replace XMALLOC + memset with XCALLOC. Fix some indentation issues. The only really significant change is simplified isis_delete_adj function in isis_adjacency.c.
* * *.c: Try to be less verbose by default (without any debug optionshasso2005-09-041-6/+8
| | | | | | | on). * isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of touching endp directly. * isis_lsp.c (lsp_build_pseudo): Ditto.
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-071-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
* * *.c: Changed many functions to static. Some commented outhasso2005-01-181-2/+2
| | | | functions and some tiny related fixes. No functional changes.
* zlog_* cleanup. Level of debug messages to LOG_DEBUG.hasso2004-12-241-8/+8
|
* No warnings here any more.hasso2004-10-071-1/+1
|
* Compiler warnings fixes.hasso2004-09-261-15/+1
|
* 2004-09-20 LIU Xin <lx at ns.6test.edu.cn>hasso2004-09-201-10/+2
| | | | | | | * isis_dr.c, isis_events.c: Remove hello multiplier usage while scheduling DIS election. * isis_pdu.c: Don't call isis_event_dis_status_change() whenever l[1|2]_desig_is is different from hdr.lan_id.
* Isisd is now able to remove addresses from circuit and trigger LSP updateshasso2004-09-141-0/+14
| | | | if it's done. Some random fixes as well and update to sample configuration.
* Indentation only. No any functional changes.hasso2004-09-101-139/+153
|
* Make it compile in NetBSD and OpenBSD.hasso2004-05-191-1/+0
|
* Threads usage cleanup. Still at least one bug to go.hasso2004-02-111-37/+22
|
* Initial revisionjardin2003-12-231-0/+336