summaryrefslogtreecommitdiffstats
path: root/isisd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.hasso2005-09-2811-200/+155
| | | | | | Replace XMALLOC + memset with XCALLOC. Fix some indentation issues. The only really significant change is simplified isis_delete_adj function in isis_adjacency.c.
* * isis_dynh.c, isisd.h: Implement dynamic hostname cache cleanup.hasso2005-09-284-3/+39
| | | | | * isis_lsp.c: Refresh dynamic hostname in the cache while refreshing topology LSP.
* * isis_lsp.c: Make topology generator generate TE TLVs if necessary.hasso2005-09-282-13/+57
| | | | | Also take care of inserting dynamic hostname of topology TLVs into cache.
* * isis_spf.c: Changing cost from uint16_t to uint32_t. Unsethasso2005-09-267-44/+185
| | | | | | | | | | | | | ISIS_ROUTE_FLAG_ACTIVE flag before running SPF. * isisd.[ch]: Separate route tables for different levels. SPF is done separately, but in case of L1L2 area they have to be merged. * isis_zebra.c: Set/unset ISIS_ROUTE_FLAG_ZEBRA_SYNC flag correctly in case of adding/removing IPv4 routes. * zebra_route.c: Rework route validating process. Merging L1 and L2 tables in case of L1L2 area. In short - many changes to make SPF work more correctly, add/remove to/from RIB also works now. It's still very far from perfect though.
* * isis_spf.[ch]: Added TE TLVs to the SPF process. It seems to workhasso2005-09-263-31/+107
| | | | | mostly, but needs certainly much more testing, especially transition situation.
* * isis_lsp.c: Put correct metric info into TE TLV's. Wide metric ishasso2005-09-262-4/+25
| | | | used only if only wide metric style (extended TLV's) is in use.
* * isis_tlv.[ch]: New function tlv_add_in_addr() to put just one IPv4hasso2005-09-264-14/+37
| | | | | | 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.
* * isis_lsp.c: Support for originating TE IS and IPv4 TLV's. No any subhasso2005-09-262-40/+179
| | | | TLV handling yet.
* * isis_tlv.[ch]: Two new functions - tlv_add_te_is_neighs() andhasso2005-09-263-0/+73
| | | | | tlv_add_te_ipv4_reachs() to handle TLV's with new metric. None of them handle sub TLVs though for now.
* * isis_circuit.[ch]: Some preliminary support for specifying widehasso2005-09-263-10/+24
| | | | circuit metrics. Needs more thinking though, but should do for now.
* * isisd.[ch]: Introduce oldmetric flag for area and transitionhasso2005-09-263-14/+36
| | | | | metricstyle command. With metricstyle wide only extended TLVs should be used.
* * dict.[ch]: Revert all nonfunctional changes. It's external modulehasso2005-09-253-1204/+1022
| | | | | | | imported from kazlib and it's better not to screw it - there is theoretical chance that we might want to merge changes from upstream at some point. Also avoid the loss of info about upstream version (rcsid).
* * isis_route.c: Fix output of nexthops in case of extreme debug.hasso2005-09-212-6/+20
|
* * isis_lsp.c, isis_pdu.c, isis_spf.c: Remove some old unused code.hasso2005-09-194-430/+4
|
* * isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4hasso2005-09-192-9/+15
| | | | reachibility metric display.
* * isis_tlv.h: Cleanup comment about TLVs we should support, remove infohasso2005-09-192-47/+68
| | | | about useless (in sense of IP(v6)) TLVs.
* * isis_lsp.h: Added backpointer to the area from LSP. For now it's usedhasso2005-09-195-142/+216
| | | | | | | | | | | | | 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.
* * isis_lsp.c (lsp_update): Fix previous commit - manipulate the righthasso2005-09-182-5/+11
| | | | database and only if LSP is really in the database (sanity check).
* * isis_lsp.c (lsp_update): Remove LSP from database before updatinghasso2005-09-164-4/+21
| | | | | | 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.
* * *.c: Try to be less verbose by default (without any debug optionshasso2005-09-0412-45/+71
| | | | | | | on). * isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of touching endp directly. * isis_lsp.c (lsp_build_pseudo): Ditto.
* * isis_lsp.c: Yet another regression introduced by stream cleanup.hasso2005-09-032-0/+10
| | | | | Similar fix to the one commited to lsp_build_nonpseudo() some days ago.
* * isis_lsp.c: Less TLV leaking.hasso2005-09-022-1/+11
|
* * random.c, spgrid.[ch]: Fix warnings with hope that I didn't brokehasso2005-09-015-25/+42
| | | | | | | | | anything. These floats to longs and vice versa casts are starnge indeed. * isis_pdu.c: As we don't use %z for size_t for now because we support older compilers, cast them to unsigned long. Also fix previous changelog entry. Isisd compiles cleanly now again.
* * isis_adjacency.c, isis_lsp.c, isisd.c: Replace XMALLOC && memsethasso2005-09-015-71/+49
| | | | | | | | | 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.
* * isis_misc.[ch]: Fix some warnings, making some strings const.hasso2005-08-163-3/+7
|
* * topology/spgrid.c: MAXLONG is deprecated, use LONG_MAX instead.hasso2005-08-102-2/+6
| | | | | | values.h, where MAXLONG is defined, is deprecated as well. Thanks to Greg for noticing and to Rivo for fix.
* * isis_dr.c: Fix copy&paste error in isis_dr_resign().hasso2005-05-262-1/+5
| | | | [backport candidate]
* 2005-05-25 Paul Jakma <paul@dishone.st>paul2005-05-252-3/+9
| | | | | | * isisd.c: (show_isis_generated_topology) change to _RO version of list macro. remove the extra listnode variable. one of the macros had had incorrect number of arguments.
* 2005-05-03 Paul Jakma <paul@dishone.st>paul2005-05-035-43/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (general) More cleaning up of stream abuse, isisd should be back to previous functionality. Replace various XMALLOC+memset's with XCALLOC * isis_tlv.c: (tlv_add_padding) use stream_put to clear the stream rather than forward endp, as isisd reuses streams. * isis_pdu.c: (process_lsp) cleanup direct reference to stream endp (send_lsp) manual copy of a stream cleaned up to use stream_copy. * isis_network.c: (isis_recv_pdu_bcast) replace direct memcpy with stream_write (isis_recv_pdu_p2p) replace recvfrom directly into stream with stream_recvfrom. Remove dangerous and now unneeded manual update of endp. (isis_recv_pdu_bcast / non-GNU_LINUX) Replace direct memcpy with stream_write. (isis_recv_pdu_p2p) replace read direct into stream with stream_read_try, and hence remove the manual update of endp. * isis_lsp.c: (lsp_update_data) manual stream dup replaced with stream_dup. (lsppdu_realloc) mempcy into stream data replaced with stream_put. (lsp_build_nonpseudo) remove mysterious stream_forward_endp's - which were originally stream_set_putp - shouldn't be needed now that all the manual fiddling of private stream data has been corrected. (build_topology_lsp_data) remove unneeded twiddling of endp, appears to be due to lsppdu_realloc(), but it appears to sort of do the right thing wrt streams.
* 2005-04-15 Paul Jakma <paul@dishone.st>paul2005-04-162-1/+6
| | | | | * topology/Makefile.am: random.c is a source of libtopology, so list it.
* * isis_adjacency.c: Fix typo introduced with listloop cleanup.hasso2005-04-122-1/+5
|
* 2005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-113-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement non-blocking zclient I/O with buffering. * zclient.h (struct zclient): Add two fields to support non-blocking I/O: struct buffer *wb, and struct thread *t_write. (zclient_free): Remove function. (zebra_redistribute_send): Change 2nd arg from socket fd to struct zclient * (needed to support non-blocking I/O and buffering). (zclient_send_message): New function to send an arbitrary message with non-blocking I/O. * zclient.c (zclient_new): Create write buffer. (zclient_free): Remove unused function. (zclient_stop): Must cancel new t_write thread. Also, reset all buffers: ibuf, obuf, and wb. (zclient_failed): New helper function for typical error handling. (zclient_flush_data): New thread to flush queued data. (zclient_send_message): New function to send the message in zclient->obuf to zebra using non-blocking I/O and buffering. (zebra_message_send, zapi_ipv4_route, zapi_ipv6_route): Use new zclient_send_message function instead of calling writen. (zclient_start): Set socket non-blocking. Also, change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. (zebra_redistribute_send): Change 2nd arg to struct zclient *. Can now use zclient->obuf to assemble the message instead of allocating a temporary stream. And call zclient_send_message to send the message instead of writen. (zclient_read): Convert to support non-blocking I/O by using stream_read_try instead of deprecated stream_read. (zclient_redistribute): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ospf6_zebra.c (ospf6_zebra_redistribute, ospf6_zebra_no_redistribute): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ospf_zebra.c (ospf_zebra_add): Call zclient_send_message instead of writen. * rip_zebra.c (rip_redistribute_set, rip_redistribute_unset, rip_redistribute_clean): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ripng_zebra.c (ripng_redistribute_unset, ripng_redistribute_clean): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * bgp_zebra.c (bgp_redistribute_set, bgp_redistribute_unset): The 2nd arg to zebra_redistribute_send is now zclient instead of zclient->sock. * isis_zebra.h (isis_zebra_finish): Remove declaration of unused function. * isis_zebra.c (isis_zebra_route_add_ipv4): Call zclient_send_message to send the message to zebra instead of calling writen directly, since zclient_send_message understands non-blocking I/O and will manage the buffer queue appropriately. (isis_zebra_finish): Remove unused function, particularly since the zclient_free function has been removed.
* 2005-04-10 Paul Jakma <paul@dishone.st>paul2005-04-105-7/+15
| | | | | | | | | | * Makefile.am: topology should not be a conditional SUBDIR, otherwise make dist breaks. * topology/Makefile.am: remove EXTRA_DIST of files which dont exist in that directory, broke make dist. * isisd.c: (show_isis_generated_topology_cmd) convert LIST_LOOP * isis_lsp.c: (generate_topology_lsps) ditto (build_topology_lsp_data) ditto
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-0713-396/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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.
* 2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-032-2/+7
| | | | * isis_zebra.c: (isis_zebra_if_del) Must use if_lookup_by_name_len.
* * configure.ac: Add --enable-isis-topology to enable isisd topologyhasso2005-04-026-14/+21
| | | | | | | | | | | | generator code. * isisd/Makefile.am: Variables to handle conditonal compiling of topology generator code. * isisd/isis_lsp.c: lsppdu_realloc() is used by topology generator. * isisd/isisd.c: Rename show_isis_topology_cmd to not conflict the one in the isis_spf.c. * isisd/isisd.h: Remove TOPOLOGY_GENERATE define, it will be defined in toplevel config.h if topology generator is enabled. * isisd/topology/Makefile.am: Handle the libtoolized Quagga libraries.
* 2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-022-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix problems when netlink interfaces are renamed (same ifindex used for a new interface). Start cleaning up some problems with the way interface names are handled. * interface.c: (if_new_intern_ifindex) Remove obsolete function. (if_delete_update) After distributing the interface deletion message, set ifp->ifindex to IFINDEX_INTERNAL. (if_dump_vty) Detect pseudo interface by checking if ifp->ifindex is IFINDEX_INTERNAL. (zebra_interface) Check return code from interface_cmd.func. Do not set internal ifindex values to if_new_intern_ifindex(), since we now use IFINDEX_INTERNAL for all pseudo interfaces. * kernel_socket.c: (ifm_read) Fix code and comments to reflect that all internal interfaces now have ifp->ifindex set to IFINDEX_INTERNAL. * rt_netlink.c: (set_ifindex) New function used to update ifp->ifindex. Detects interface rename events by checking if that ifindex is already being used. If it is, delete the old interface before assigning the ifindex to the new interface. (netlink_interface, netlink_link_change) Call set_ifindex to update the ifindex. * if.h: Remove define for IFINDEX_INTERNBASE and add define IFINDEX_INTERNAL 0, since all internal (i.e. non-kernel) pseudo- interfaces should have ifindex set to 0. (if_new) Remove function. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (ifname2ifindex) New function. * if.c: (if_new) Remove function (absorb into if_create). (if_create) Replace function if_new with call to calloc. Set ifp->ifindex to IFINDEX_INTERNAL. Fix off-by-one error in assert to check length of interface name. Add error message if interface with this name already exists. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (if_delete) Implement with help of if_delete_retain. (ifindex2ifname) Reimplement using if_lookup_by_index. (ifname2ifindex) New function to complement ifindex2ifname. (interface) The interface command should check the name length and fail with a warning message if it is too long. (no_interface) Fix spelling in warning message. (if_nametoindex) Reimplement using if_lookup_by_name. (if_indextoname, ifaddr_ipv4_lookup) Reimplement using if_lookup_by_index. * bgp_zebra.c: (bgp_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead of if_delete, since it is generally not safe to remove interface structures. After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Tighten up code. * ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function was commented out. But this is not safe: we should at least update the ifindex when the interface is deleted. So the new version updates the interface status and sets ifp->ifindex to IFINDEX_INTERNAL. (ospf6_zebra_route_update) Use if_indextoname properly. * ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface flags to help with debugging. * ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Make function static. Tighten up code. * rip_interface.c: (rip_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * ripng_interface.c: (ripng_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL.
* * configure.ac, */Makefile.am: Fix previous commit. SNMP includeshasso2005-03-281-1/+1
| | | | | must be after lib/ includes in some systems. Introduce SNMP_INCLUDES for that.
* * isis_spf.c: host.name might be NULL.hasso2005-03-072-1/+6
| | | | [backport candidate]
* 2005-02-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-02-232-1/+6
| | | | | | * {vty.h,vty.c}: Remove vty_finish (duplicate of vty_reset). * isis_main.c: (reload) Call vty_reset instead of vty_finish (both functions were exactly the same).
* 2005-02-09 Paul Jakma <paul.jakma@sun.com>paul2005-02-094-37/+25
| | | | | | | | | | | | | * (global) Update code to match stream.h changes. stream_get_putp effectively replaced with stream_get_endp. stream_forward renamed to stream_forward_getp. stream_forward_endp introduced to replace some previous setting/manual twiddling of putp by daemons. * lib/stream.h: Remove putp. Update reference to putp with endp. Add stream_forward_endp, which daemons were doing manually. Rename stream_forward to stream_forward_getp. lib/stream.c: Remove/update references to putp. introduce stream_forward_endp.
* * *.c: Changed many functions to static. Some commented outhasso2005-01-1811-112/+131
| | | | functions and some tiny related fixes. No functional changes.
* More cleanup in isisd.hasso2005-01-013-374/+0
|
* Move TODO items from isid to the common TODO.hasso2005-01-011-10/+0
|
* There is no need to keep this directory.hasso2005-01-0119-22140/+0
|
* Make authentication of SNPs work correctly - ie. conditionally like it is inhasso2005-01-014-30/+102
| | | | IOS.
* Really fix crashes now. Revert isis_circuit_update_params() part of previoushasso2004-12-293-13/+11
| | | | commit. Replace all if_is_up() calls with if_is_operative().
* Don't crash during interface up/down events.hasso2004-12-294-3/+21
|
* zlog_* cleanup. Level of debug messages to LOG_DEBUG.hasso2004-12-2415-285/+290
|
* 2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-072-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_main.c: (main) The 2nd argument to openzlog has been removed. * isis_main.c: (main) The 2nd argument to openzlog has been removed. * ospf6_main.c: (main) The 2nd argument to openzlog has been removed. Note that stdout logging will no longer be enabled by default when not running as a daemon. * ospf_main.c: (main) The 2nd argument to openzlog has been removed. * rip_main.c: (main) The 2nd argument to openzlog has been removed. * ripng_main.c: (main) The 2nd argument to openzlog has been removed. * main.c: (main) The 2nd argument to openzlog has been removed. So stdout logging will no longer be enabled by default. * irdp_main.c: (irdp_finish) Reduce severity of shutdown message from LOG_WARNING to LOG_INFO. * vtysh.c: Make several functions static instead of global. Added several commands to support destination-specific logging levels. (vtysh_completion) This function is unused, so comment it out. * basic.texi: Document new logging features. Separate basic config commands from basic VTY commands. * log.h: Replace struct zlog flags and maskpri fields with maxlvl array to support individual logging levels for each destination. Remove the 2nd argument to openzlog since the default logging config should be standardized inside the library. Replaced the zlog_set_flag and zlog_reset_flag functions with zlog_set_level. And zlog_set_file now requires an additional log_level argument. Declare zlog_proto_names for use inside command.c in the "show logging" command. Added defines useful for command construction. * log.c: (vzlog) Decide where to send the message based on the individual logging levels configured for each destination. Remove support for ZLOG_STDERR since it was never actually used. Support record-priority for terminal monitors. (zlog_signal,zlog_backtrace_sigsafe) Support destination-specific logging levels. Remove stderr support (was never used). Added support for terminal monitor logging. (_zlog_assert_failed) Increase message severity to LOG_EMERG. (openzlog) Remove 2nd argument since default config should be standardized in library. By default, terminal monitoring is set to debug, and all other logging is disabled. (zlog_set_flag,zlog_reset_flag) Removed. (zlog_set_level) New function to replace zlog_set_flag and zlog_reset_flag. Supports destination-specific logging levels. (zlog_set_file,zlog_reset_file) Support file-specific logging level. (zlog_rotate) Log an error message if fopen fails, and support new file-specific logging level. * command.h: Change DEFUN_CMD_FUNC_DECL and DEFUN_CMD_FUNC_TEXT so that command functions will be static instead of global. Remove declarations for config_exit and config_help. Define new macros DEFUNSH_ATTR, DEFUNSH_HIDDEN, and DEFUNSH_DEPRECATED so we can have deprecated commands in vtysh. Similarly, for completeness, define macros ALIAS_SH, ALIAS_SH_HIDDEN, and ALIAS_SH_DEPRECATED. Also, fix bug in ALIAS_ATTR macro (didn't matter because it was never used). * command.c: Make many functions static instead of global. (facility_name,facility_match,level_match) New functions to support enhanced destination-specific logging levels. (config_write_host) Support new destination-specific logging levels. (config_logmsg) Added new "logmsg" command to help test logging system. (show_logging) Added "show logging" command to show the current configuration of the logging system. (config_log_stdout_level) Support explicit stdout logging level. (no_config_log_stdout) Now takes optional LEVEL arg. (config_log_monitor,config_log_monitor_level,no_config_log_monitor) New commands creating new "log monitor" commands to set terminal monitoring log level. (config_log_file_level) Support explicit file logging level. (config_log_syslog_level) Support explicit syslog logging level. (config_log_facility,no_config_log_facility) Implement new "log facility" command. (cmd_init) Add hooks for new commands: "show logging", "logmsg", "log stdout <level>", "log monitor", "log monitor <level>", "no log monitor", "log file <filename> <level>", "no log file <filename> <level>", "log syslog <level>", "log facility", and "no log facility". * vty.h: Added a "level" argument to vty_log so it can support "log record-priority". Declare new function vty_log_fixed for use in signal handlers. * vty.c: (vty_log,vty_log_out) Added a "level" argument to support "log record-priority" for vty terminal monitors. (vty_down_level) Use config_exit_cmd.func instead of calling config_exit directly (since command functions will now be static instead of global). (vty_log_fixed) New function to send terminal monitor messages from inside a signal handler.