summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| | * [lib] include inttypes.h rather than stdint.h, provide defines where missingPaul Jakma2006-05-282-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | 2006-05-28 Paul Jakma <paul.jakma@sun.com> * zebra.h: Include inttypes.h rather than stdint.h, best practice according to the autoconf manual. Add UINT*_MAX defines for older platforms lacking these (FBSD 4)
| | * [interface configuration] Try to avoid losing address info after shutdown.Andrew J. Schorr2006-05-212-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-05-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * if.h: (struct connected) Document the meaning of the ZEBRA_IFC_REAL and ZEBRA_IFC_CONFIGURED flags. * connected.c: (connected_withdraw) Do not delete the connected address if the ZEBRA_IFC_CONFIGURED flag is set. (connected_add_ipv4,connected_add_ipv6) Before calling connected_withdraw, unset the ZEBRA_IFC_CONFIGURED flag on the superseded connected structure.
| | * [lib] Add string mapping table for Zserv commandsPaul Jakma2006-05-153-22/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-05-15 Paul Jakma <paul.jakma@sun.com> * log.c: (general) Generalise struct zebra_route_desc into struct zebra_desc_table and, similar to route_types, add a command_types table to describe Zserv protocol commands. (route_types[]) use a macro to use designated initialisers while avoiding tedious duplication. (zserv_command_string) lookup string from zebra_desc_table, similar to zebra_route_string * zebra.h: Add declaration for zserv_command_string, adjust the comments to reflect zebra_desc_table.
| | * [lib] CID #39, Fix the vty completion leak-fix to only free when desiredPaul Jakma2006-05-152-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | 2006-05-13 Paul Jakma <paul.jakma@sun.com> * vty.c: (vty_describe_command) CID #39 fix was too hasty, just cause it /can/ leak doesn't mean it always will have, check first.
| | * [lib] CID #55, fix return of freed pointer, cmd_describe_command_realPaul Jakma2006-05-122-3/+5
| | | | | | | | | | | | | | | | | | | | | 2006-05-12 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_describe_command_real) Fix return of freed pointer when no-match, CID #55.
| | * [lib] CID #39, fix leak in error path, vty_describe_commandPaul Jakma2006-05-122-8/+5
| | | | | | | | | | | | | | | | | | | | | 2006-05-12 Paul Jakma <paul.jakma@sun.com> * vty.c: (vty_describe_command) fix leak of describe vector in error path, CID #39.
| | * [lib] CID #37, fix error case leak, cmd_complete_command_realPaul Jakma2006-05-122-1/+4
| | | | | | | | | | | | | | | | | | | | | 2006-05-12 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_complete_command_real) Fix leak of cmd_vector in error case, Coverity CID #37.
| | * [lib] CID #3, fix forward-null errors in vty_prefix_list_uninstallPaul Jakma2006-05-122-0/+12
| | | | | | | | | | | | | | | | | | | | | 2006-05-12 Paul Jakma <paul.jakma@sun.com> * plist.c: (vty_prefix_list_uninstall) Fix potential NULL deref of prefix and typestr strings, Coverity CID #3.
| | * [lib] command.c exports host global, add it to header.Paul Jakma2006-03-302-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-03-14 Paul Jakma <paul.jakma@sun.com> * privs.c: (zprivs_caps_init) Change user IDs before lowering privileges, while this seems to work on Linux, on Solaris it rightfully refuses due to PRIV_PROC_SETID having been dropped. * command.h: Add the struct host global exported from command.c
| | * [lib] Trivial: fix line lengths of a comment in workqueu.cPaul Jakma2006-03-302-2/+4
| | | | | | | | | | | | | | | | | | 2006-03-30 Paul Jakma <paul.jakma@sun.com> * workqueue.c: (work_queue_run) fix line length of comment
| | * [lib] Mark most arguments in DEFUN_CMD_FUNC_TEXT as potentially unusedPaul Jakma2006-03-302-1/+9
| | | | | | | | | | | | | | | | | | | | | 2006-03-30 Paul Jakma <paul.jakma@sun.com> * command.h: (DEFUN_CMD_FUNC_TEXT) Annotate arguments as potentially being unused.
| | * [lib] fix gensub call in memtypes.awk to pass "g", not g.Paul Jakma2006-03-302-3/+7
| | | | | | | | | | | | | | | | | | 2006-03-27 Paul Jakma <paul.jakma@sun.com> * memtypes.awk: Fix gensub call, g should be a string..
| | * [lib] status field/flags no longer used in struct workqueuePaul Jakma2006-03-302-3/+5
| | | | | | | | | | | | | | | | | | | | | 2006-03-25 Paul Jakma <paul.jakma@sun.com> * workqueue.h: (struct work_queue) Remove status field and state flag, no longer used.
| | * [bgpd] trivial: use a distinct memtype for struct bgp_synchronizePaul Jakma2006-03-302-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | 2006-03-19 Paul Jakma <paul.jakma@sun.com> * memtypes.c: Add MTYPE_BGP_SYNCHRONISE. * bgp_advertise.c: Use a distinct memory type for struct bgp_synchronize.
| | * [lib] fix libtool version argument in Makefile.amPaul Jakma2006-03-302-1/+5
| | | | | | | | | | | | | | | | | | 2006-03-16 Paul Jakma <paul.jakma@sun.com> * Makefile.am: Fix -version-info argument.
| | * [lib/memory] Add mallinfo supportPaul Jakma2006-03-303-1/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-02-15 Paul Jakma <paul.jakma@sun.com> * configure.ac: Check for mallinfo, being careful to link test so we can detect things like umem being used (which doesn't provide a mallinfo). * lib/memory.c: (mtype_memstr) new helper function to return human friendly string for a byte count. (mtype_stats_alloc) new function, for users to retrieve number of objects allocated. (show_memory_mallinfo) New function, show mallinfo statistics if available. (show_memory_all_cmd) Call show_memory_mallinfo, if mallinfo is available. * lib/memory.h: Export mtype_memstr and mtype_stats_alloc. Provide a define for a reasonable buffer size for mtype_memstr.
| | * [lib/privs] Changing user IDs should be done before dropping privilegesPaul Jakma2006-03-302-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-03-14 Paul Jakma <paul.jakma@sun.com> * privs.c: (zprivs_caps_init) Change user IDs before lowering privileges, while this seems to work on Linux, on Solaris it rightfully refuses due to PRIV_PROC_SETID having been dropped.
| | * [lib] export show_address_cmd debug command in if.hPaul Jakma2006-03-062-0/+6
| | | | | | | | | | | | | | | | | | | | | 2006-03-06 Paul Jakma <paul.jakma@sun.com> * if.h: export show_address_cmd, for anyone who wishes to use it.
| | * [lib/sockunion] trivial: use XSTRDUP.Paul Jakma2006-02-212-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | 2006-02-21 Paul Jakma <paul.jakma@sun.com> * sockunion.c: (sockunion_{su2str,log}) Use XSTRDUP. Particularly with _su2str, as that string gets XFREEd, which can be annoying if run debug code in memory.c.
* | | Use XCALLOCStephen Hemminger2008-08-186-30/+8
| | | | | | | | | | | | Replace calls to XMALLOC followed by memset with XCALLOC.
* | | Make command nodes staticStephen Hemminger2008-08-116-13/+13
| | | | | | | | | | | | | | | The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
* | | Add compiler directive to mark code paths that log as coldStephen Hemminger2008-08-082-18/+26
| | | | | | | | | | | | | | | This causes compiler to naturally favor faster path through code. Anything that logs a message is not fast path.
* | | Mark assert() tests as unlikelyStephen Hemminger2008-08-081-3/+11
| | | | | | | | | | | | | | | This forces compiler to generate the more common code on the faster path.
* | | Add gcc printf format checksStephen Hemminger2008-08-081-6/+12
| | |
* | | Make log message lookup function use const tablesStephen Hemminger2008-08-013-4/+4
| | | | | | | | | | | | Message tables should be unaltered.
* | | Add prototype for sockopt_ipv4_tosStephen Hemminger2008-08-011-0/+1
| | |
* | | Make hash compare functions take const argsStephen Hemminger2008-07-315-16/+15
| | | | | | | | | | | | The hash compare function should not be modifiying its args
* | | Merge branch 'upstream' into islavistaStephen Hemminger2008-07-3119-86/+110
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog NEWS bgpd/ChangeLog bgpd/bgp_attr.c bgpd/bgp_network.c bgpd/bgp_packet.c bgpd/bgp_vty.c bgpd/bgpd.c bgpd/bgpd.h lib/sockopt.c lib/sockopt.h lib/zebra.h mkinstalldirs zebra/rib.h zebra/rt_netlink.c
| * | [bgpd] TCP-MD5: password vty configuration and initial Linux supportpaul2008-07-215-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-21 Paul Jakma <paul.jakma@sun.com> * bgp_packet.c: (bgp_open_receive) fix warning in a zlog call * bgp_vty.c: (bgp_vty_return) add return code * bgpd.c: (bgp_master_init) setup the socket list. * bgp_network.c: Remove the dual IPv4/6 socket thing for now, which was implemented by Michael, until such time as its clear its required for Linux (see sockopt comments). IPv6 support, including IPv4 sessions on AF_INET6 sockets, therefore is broken, and the '-l 0.0.0.0' arguments would need to be given to bgpd to make things work here. 2008-07-21 Michael H. Warfield <mhw@wittsend.com> YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Tomohiko Kusuda <kusuda@inetcore.com> Leigh Brown <leigh@solinno.co.uk> * bgp_network.c: (bgp_md5_set_one) shim between libzebra tcp-md5 sockopt and bgpd. (bgp_md5_set_socket) Helper for bgp_connect (bgp_md5_set) setup TCP-MD5SIG for the given peer. (bgp_connect) call out to bgp_md5_set_socket for the outgoing connect socket. (bgp_socket) save references to the listen sockets, needed if TCP-MD5SIG is applied later or changed. * bgp_vty.c: (*neighbor_password_cmd) New 'neighbor ... password' commands. * bgpd.c: (peer_{new,delete) manage TCP-MD5 password (peer_group2peer_config_copy) inherit TCP-MD5 password (peer_password_{un,}set) orchestrate the whole add/remove of TCP-MD5 passwords: applying checks, stopping peers, and trying to return errors to UI, etc. (bgp_config_write_peer) save password. Fix missing newline in writeout of neighbor ... port. 2008-07-21 Paul Jakma <paul.jakma@sun.com> * sockunion.c: ifdef out various places that converted v4mapped sockets to pure v4. Doesn't seem necessary at all, presumably a workaround for now historical inet_ntop bugs (?) 2008-07-21 Michael H. Warfield <mhw@wittsend.com> YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> * sockopt.{c,h}: (sockopt_tcp_signature) Add TCP-MD5SIG support.
| * | [lib] trivial: add const qualifier to stream_put/writepaul2008-06-073-4/+9
| | | | | | | | | | | | | | | | | | | | | 2008-06-07 Paul Jakma <paul@jakma.org> * stream.{c,h}: (stream_{put,write}) add const qualifier to source argument. Change u_char to void *.
| * | + initial edition of meta-queue for RIB updates processing (bug #431)pilot2008-06-023-17/+9
| | |
| * | [zebra/linux] Use BPF to filter out responses, to try avoid netlink overrunspaul2008-05-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2008-05-29 Stephen Hemminger <stephen.hemminger@vyatta.com> * rt_netlink.c: (netlink_install_filter) BPF filter to catch and drop responses to zebra's own route messages. (kernel_init) add BPF filter on the netlink socket.
| * | [lib] Fix the struct message LOOKUP function to be more robustpaul2008-02-283-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-02-28 Paul Jakma <paul.jakma@sun.com> * log.c: (mes_lookup) Sowmini Varadhan diagnosed a problem where this function can cause a NULL dereference, on lookups for unknown indices, or messages with NULL strings. Can occur, e.g., debug logging code when processing received messages. Fixed to accept a pointer to a default string to be used if there is no match. * log.h: LOOKUP adjusted to match
| * | [lib/linklist] Enforce "nodes must have data" invariant more rigorouslypaul2008-02-282-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-02-28 Paul Jakma <paul.jakma@sun.com> * linklist.c: This implementation expects that the data pointer not be null, e.g. listgetdata() asserts this. The list add methods don't apply the same sanity check. Noted by Jim Carlson in bug #437.
| * | [c++] remove/rename some names in headers that clash with C++ reserved wordspaul2008-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-30 Peter Szilagyi <sp615@hszk.bme.hu> * lib/stream.h: Remove named 'new' parameter in prototype for c++ header compatibility. * ospfd/ospf_opaque.h: ditto * ospfd/ospfd.h: Renamed struct export to _export for c++ header compatibility. * ospf6d/ospf6_area.h: ditto
| * | [link-detect] Improve BSD support.ajs2008-01-112-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * lib/zebra.h: Revert previous change, no need to include <net/if_media.h> here. * zebra/ioctl.c: If HAVE_BSD_LINK_DETECT is defined, include <net/if_media.h> (if_get_flags) Remove debug messages about BSD link state. * zebra/kernel_socket.c: (bsd_linkdetect_translate) If link state is unknown, we should set the IFF_RUNNING flag.
| * | [link-detect] Try to get BSD link-detect to work properly.ajs2008-01-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-10 Ingo Flaschberger <if@xip.at> * configure.ac: Define HAVE_BSD_LINK_DETECT if <net/if_media.h> is present. * lib/zebra.h: If HAVE_BSD_LINK_DETECT is defined, include <net/if_media.h>. * zebra/ioctl.c: (if_get_flags) If HAVE_BSD_LINK_DETECT, use the SIOCGIFMEDIA ioctl to ascertain link state. * zebra/kernel_socket.c: (bsd_linkdetect_translate) New function to map the ifm_data.ifi_link_state value into the IFF_RUNNING flag. (ifm_read) Call bsd_linkdetect_translate to fix the IFF_RUNNING flag before calling if_flags_update.
| * | [lib] add mising UL qualifier to numerical constantpaul2008-01-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | 2008-01-08 Pavol Rusnak <prusnak@suse.cz> * memory.c: (mtype_memstr) Fix accidental shift past width of type, constant should have been forced to UL, rather than being left to default to int.
| * | + fixed bug #418 (changing address on an existing interface doesn't cause ↵pilot2007-11-124-11/+41
| | | | | | | | | | | | existing static routes to be revalidated)
| * | [snmp-smux] Fix problems if 'smux peer ...' is issued multiple timespaul2007-10-222-2/+17
| | | | | | | | | | | | | | | | | | | | | 2007-10-22 Lorenzo Colitti <lorenzo@colitti.com> * smux.c: (smux_stop) Avoid cancelling a defunct thread pointer (smux_start) Stop smux before trying to start it, possibly again.
| * | + pidfiles are now always created with 0644 perms instead if LOGFILE_MASK (0600)pilot2007-10-042-3/+10
| | |
| * | [privs/Solaris] Quagga should work in zones with IP instancespaul2007-09-182-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-09-18 Paul Jakma <paul.jakma@sun.com> * privs.c: definition of ZCAP_NET_ADMIN on Solaris should be PRIV_SYS_IP_CONFIG, when that's available. Thus allowing Quagga to work with in Solaris zones with exclusive IP instances.
| * | Bug #362 is fixed now.pilot2007-08-213-0/+36
| | |
| * | Merged own patch for the bug #391 (debugging and comments mostly).pilot2007-08-132-0/+6
| | |
| * | [ospfd] Fix bad SPF calculation on some topologies - incorrect sortingpaul2007-08-063-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-08-07 Atis Elsts <atis@mikrotik.com> * ospf_spf.c: (ospf_spf_next) Sort heap in correct direction after vertex cost is changed, thus fixing incorrect SPF calculation on certain topologies. * lib/pqueue.{c,h}: Export trickle_up
| * | [bgpd] cleanup, compact and consolidate capability parsing codepaul2007-08-062-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not always present or correct). * bgp_open.h: Add structures for the generic capability TLV header and for the data formats of the various specific capabilities we support. Hence remove the badly named, or else misdefined, struct capability. * bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data. Do the length checks *before* memcpy()'ing based on that length (stored capability - should have been validated anyway on input, but..). (bgp_afi_safi_valid_indices) new function to validate (afi,safi) which is about to be used as index into arrays, consolidates several instances of same, at least one of which appeared to be incomplete.. (bgp_capability_mp) Much condensed. (bgp_capability_orf_entry) New, process one ORF entry (bgp_capability_orf) Condensed. Fixed to process all ORF entries. (bgp_capability_restart) Condensed, and fixed to use a cap-specific type, rather than abusing capability_mp. (struct message capcode_str) added to aid generic logging. (size_t cap_minsizes[]) added to aid generic validation of capability length field. (bgp_capability_parse) Generic logging and validation of TLV consolidated here. Code compacted as much as possible. * bgp_packet.c: (bgp_open_receive) Capability parsers now use streams, so no more need here to manually fudge the input stream getp. (bgp_capability_msg_parse) use struct capability_mp_data. Validate lengths /before/ memcpy. Use bgp_afi_safi_valid_indices. (bgp_capability_receive) Exported for use by test harness. * bgp_vty.c: (bgp_show_summary) fix conversion warning (bgp_show_peer) ditto * bgp_debug.h: Fix storage 'extern' after type 'const'. * lib/log.c: (mes_lookup) warning about code not being in same-number array slot should be debug, not warning. E.g. BGP has several discontigious number spaces, allocating from different parts of a space is not uncommon (e.g. IANA assigned versus vendor-assigned code points in some number space).
| * | [lib] Add comments regarding setsockopt_multicast_ipv4 arguments.ajs2007-07-063-4/+13
| | | | | | | | | | | | | | | | | | | | | 2007-07-06 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * sockopt.{c,h}: (setsockopt_multicast_ipv4) Add some comments about the arguments.
| * | [linux] Fix strange compilation problem by explicitly including <linux/types.h>ajs2007-06-012-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 2007-06-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * zebra.h: On linux, we seem to need to include <linux/types.h> before <sys/sysctl.h>, otherwise we get isisd compilation errors about __be16 not being defined.
| * | [autoconf] GNU_SOURCE can be defined twice, through AC_FUNC_STRNLENpaul2007-05-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-05-10 Paul Jakma <paul.jakma@sun.com> * configure.ac: Use AC_GNU_SOURCE to define _GNU_SOURCE, rather than having lib/zebra.h do it. AC_FUNC_STRNLEN has side-effects with latest autoconf, use AC_CHECK_FUNC on strnlen instead. * lib/zebra.h: Don't try define _GNU_SOURCE, autoconf should do it.
| * | [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warningspaul2007-05-106-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-05-09 Paul Jakma <paul.jakma@sun.com> * configure.ac: sys/conf.h depends on sys/param.h, at least on FBSD 6.2. (bug #363) Should check for in_pktinfo for IRDP 2006-05-27 Paul Jakma <paul.jakma@sun.com> * configure.ac: General cleanup of header and type checks, introducing an internal define, QUAGGA_INCLUDES, to build up a list of stuff to include so as to avoid 'present but cant be compiled' warnings. Misc additional checks of things missing according to autoscan. Add LIBM, for bgpd's use of libm, so as to avoid burdening LIBS, and all the binaries, with libm linkage. Remove the bad practice of using m4 changequote(), just quote the []'s in the case statements properly. This should fix bugs 162, 303 and 178. * */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN, * bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().