]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
17 years ago[solaris] Add licence boilerplate to files for clarity
Paul Jakma [Thu, 22 Feb 2007 17:55:20 +0000 (17:55 +0000)]
[solaris] Add licence boilerplate to files for clarity

2007-02-22 Paul Jakma <paul.jakma@sun.com>

* quagga.{xml,init}.in: Add licence boilerplate to ensure
  licence terms are clear.

17 years ago[bgpd] Peer delete can race with reconfig leading to crash
Paul Jakma [Thu, 22 Feb 2007 17:48:42 +0000 (17:48 +0000)]
[bgpd] Peer delete can race with reconfig leading to crash

2007-02-22 Paul Jakma <paul.jakma@sun.com>

* bgp_fsm.c: (bgp_fsm_change_status) Handle state change into
  clearing or greater here. Simpler.
  (bgp_event) Clearing state change work moved to previous
* bgp_route.c: (bgp_clear_route_node) Clearing adj-in here
  is too late, as it leaves a race between a peer being deleted
  and an identical peer being configured before clearing
  completes, leading to a crash.
  Simplest fix is to clean peers Adj-in up-front, rather than
  queueing such work.
  (bgp_clear_route_table) Clear peer's Adj-In and Adj-Out
  up-front here, rather than queueing such work.
  Extensive comment added on the various bits of indexed data
  that exist and how they need to be dealt with.
  (bgp_clear_route) Update comment.

17 years agouse generic sed test so this works on autoconf 2.59
Greg Troxel [Tue, 6 Feb 2007 20:10:35 +0000 (20:10 +0000)]
use generic sed test so this works on autoconf 2.59

17 years agode-support NetBSD 1.6, and note that FreeBSD 4 is on thin ice.
Greg Troxel [Tue, 6 Feb 2007 19:56:31 +0000 (19:56 +0000)]
de-support NetBSD 1.6, and note that FreeBSD 4 is on thin ice.

Update notes on required tool versions Note that autoconf 2.59 is the
standard (even though it's old, 2.60 and 2.61 are pretty recent).  For
others, pick releases that are at least 1.5 years old.

Note that GNU awk is required.

Replace update-autotools reference with bootstrap.sh.

(no changelog, doc change only, per GNU coding standards)

17 years agoBetter comment explaining that GNU awk is really required.
Greg Troxel [Tue, 6 Feb 2007 19:36:47 +0000 (19:36 +0000)]
Better comment explaining that GNU awk is really required.

17 years agoautoreconf -i
Greg Troxel [Tue, 6 Feb 2007 19:28:28 +0000 (19:28 +0000)]
autoreconf -i

17 years agoadd AC_PROC_SED
Greg Troxel [Sat, 3 Feb 2007 22:30:02 +0000 (22:30 +0000)]
add AC_PROC_SED

17 years agoremove crufty m4 files from 2004. With the files, autoheader (2.61)
Greg Troxel [Sat, 3 Feb 2007 01:07:01 +0000 (01:07 +0000)]
remove crufty m4 files from 2004.  With the files, autoheader (2.61)
bombs on NetBSD.  (Without, all is ok.  We may need workarounds, but
first we should identify minimum tool versions and figure out what's
still wrong.)

ok'd by paul.

17 years agouse bootstrap.sh
Greg Troxel [Fri, 2 Feb 2007 17:03:03 +0000 (17:03 +0000)]
use bootstrap.sh

17 years agoProvide 'standard interface', even if it just invokes autoreconf.
Greg Troxel [Fri, 2 Feb 2007 17:01:58 +0000 (17:01 +0000)]
Provide 'standard interface', even if it just invokes autoreconf.

17 years agoospf6d.h: remove declaration of errno (should be via header)
Greg Troxel [Fri, 2 Feb 2007 16:54:23 +0000 (16:54 +0000)]
ospf6d.h: remove declaration of errno (should be via header)

(from pkgsrc)

17 years ago* README.NetBSD: use update-autotools instead of autoreconf
Greg Troxel [Fri, 2 Feb 2007 16:52:38 +0000 (16:52 +0000)]
* README.NetBSD:  use update-autotools instead of autoreconf
* update-autotools: print out tool name before invoking to aid debugging

17 years ago[ospfd] Bug #330: SPF must consider that nexthop-calc may fail
Paul Jakma [Wed, 24 Jan 2007 14:51:51 +0000 (14:51 +0000)]
[ospfd] Bug #330: SPF must consider that nexthop-calc may fail

2007-01-24 Paul Jakma <paul.jakma@sun.com>

* ospf_spf.c: Bug #330: Nexthop calculation sometimes may fail,
  and it needs to indicate this result to SPF.
  (ospf_spf_add_parent) Flush of parent list needs to be done here,
  for simplicity.
  (ospf_nexthop_calculation) Caller needs to know whether
  nexthop calculation succeeded. Every return statement must
  correctly indicate such.
  (ospf_spf_next) Queueing/prioritisation of vertices in SPF
  must take into account whether nexthop_calculation succeeded,
  or SPF may fail to find best paths.

17 years ago[zebra] For solaris IPv6 PtP interfaces, try to support prefixlen != 128
Andrew J. Schorr [Wed, 13 Dec 2006 15:44:15 +0000 (15:44 +0000)]
[zebra] For solaris IPv6 PtP interfaces, try to support prefixlen != 128

2006-12-13 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* if_ioctl_solaris.c: (if_get_addr) For IPv6, stop assuming
  that all IFF_POINTOPOINT have prefixlen of IPV6_MAX_BITLEN.
  Instead, always try the SIOCGLIFSUBNET ioctl; if that fails,
  then we fall back to IPV6_MAX_BITLEN for PtP interfaces.

17 years ago[PtP over ethernet] New peer flag allows much more addressing flexibility
Andrew J. Schorr [Tue, 12 Dec 2006 19:18:21 +0000 (19:18 +0000)]
[PtP over ethernet] New peer flag allows much more addressing flexibility

2006-12-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* if.h: (struct connected) Add new ZEBRA_IFA_PEER flag indicating
  whether a peer address has been configured.  Comment now shows
  the new interpretation of the destination addr: if ZEBRA_IFA_PEER
  is set, then it must contain the destination address, otherwise
  it may contain the broadcast address or be NULL.
  (CONNECTED_DEST_HOST,CONNECTED_POINTOPOINT_HOST) Remove obsolete
  macros that were specific to IPv4 and not fully general.
  (CONNECTED_PEER) New macro to check ZEBRA_IFA_PEER flag.
  (CONNECTED_PREFIX) New macro giving the prefix to insert into
  the RIB: if CONNECTED_PEER, then use the destination (peer) address,
  else use the address field.
  (CONNECTED_ID) New macro to come up with an identifying address
  for the struct connected.
* if.c: (if_lookup_address, connected_lookup_address) Streamline
  logic with new CONNECTED_PREFIX macro.
* prefix.h: (PREFIX_COPY_IPV4, PREFIX_COPY_IPV6) New macros
  for better performance than the general prefix_copy function.
* zclient.c: (zebra_interface_address_read) For non-null destination
  addresses, set prefixlen to equal the address prefixlen.  This
  is needed to get the new CONNECTED_PREFIX macro to work properly.
* connected.c: (connected_up_ipv4, connected_down_ipv4,
  connected_up_ipv6, connected_down_ipv6) Simplify logic using the
  new CONNECTED_PREFIX macro.
  (connected_add_ipv4) Set prefixlen in destination addresses (required
  by the CONNECTED_PREFIX macro).  Use CONNECTED_PEER macro instead
  of testing for IFF_POINTOPOINT.  Delete invalid warning message.
  Warn about cases where the ZEBRA_IFA_PEER is set but no
  destination address has been supplied (and turn off the flag).
  (connected_add_ipv6) Add new flags argument so callers may set
  the ZEBRA_IFA_PEER flag.  If peer/broadcast address satisfies
  IN6_IS_ADDR_UNSPECIFIED, then reject it with a warning.
  Set prefixlen in destination address so CONNECTED_PREFIX will work.
* connected.h: (connected_add_ipv6) Add new flags argument so
  callers may set the ZEBRA_IFA_PEER flag.
* interface.c: (connected_dump_vty) Use CONNECTED_PEER macro
  to decide whether the destination address is a peer or broadcast
  address (instead of checking IFF_BROADCAST and IFF_POINTOPOINT).
* if_ioctl.c: (if_getaddrs) Instead of setting a peer address
  only when the IFF_POINTOPOINT is set, we now accept a peer
  address whenever it is available and not the same as the local
  address.  Otherwise (no peer address assigned), we check
  for a broadcast address (regardless of the IFF_BROADCAST flag).
  And must now pass a flags value of ZEBRA_IFA_PEER to
  connected_add_ipv4 when a peer address is assigned.
  The same new logic is used with the IPv6 code as well (and we
  pass the new flags argument to connected_add_ipv6).
  (if_get_addr) Do not bother to check IFF_POINTOPOINT: just
  issue the SIOCGIFDSTADDR ioctl and see if we get back
  a peer address not matching the local address (and set
  the ZEBRA_IFA_PEER in that case).  If there's no peer address,
  try to grab SIOCGIFBRDADDR regardless of whether IFF_BROADCAST is set.
* if_ioctl_solaris.c: (if_get_addr) Just try the SIOCGLIFDSTADDR ioctl
  without bothering to check the IFF_POINTOPOINT flag.  And if
  no peer address was found, just try the SIOCGLIFBRDADDR ioctl
  without checking the IFF_BROADCAST flag.  Call connected_add_ipv4
  and connected_add_ipv6 with appropriate flags.
* if_proc.c: (ifaddr_proc_ipv6) Must pass new flags argument to
  connected_add_ipv6.
* kernel_socket.c: (ifam_read) Must pass new flags argument to
  connected_add_ipv6.
* rt_netlink.c: (netlink_interface_addr) Copy logic from iproute2
  to determine local and possible peer address (so there's no longer
  a test for IFF_POINTOPOINT).  Set ZEBRA_IFA_PEER flag appropriately.
  Pass new flags argument to connected_add_ipv6.
  (netlink_address) Test !CONNECTED_PEER instead of if_is_broadcast
  to determine whether the connected destination address is a
  broadcast address.
* bgp_nexthop.c: (bgp_connected_add, bgp_connected_delete)
  Simplify logic by using new CONNECTED_PREFIX macro.
* ospf_interface.c: (ospf_if_is_configured, ospf_if_lookup_by_prefix,
  ospf_if_lookup_recv_if) Simplify logic using new CONNECTED_PREFIX
  macro.
* ospf_lsa.c: (lsa_link_ptop_set) Using the new CONNECTED_PREFIX
  macro, both options collapse into the same code.
* ospf_snmp.c: (ospf_snmp_if_update) Simplify logic using new
  CONNECTED_ID macro.
  (ospf_snmp_is_if_have_addr) Simplify logic using new CONNECTED_PREFIX
  macro.
* ospf_vty.c: (show_ip_ospf_interface_sub) Use new CONNECTED_PEER macro
  instead of testing the IFF_POINTOPOINT flag.
* ospfd.c: (ospf_network_match_iface) Use new CONNECTED_PEER macro
  instead of testing with if_is_pointopoint.  And add commented-out
  code to implement alternative (in my opinion) more elegant behavior
  that has no special-case treatment for PtP addresses.
  (ospf_network_run) Use new CONNECTED_ID macro to simplify logic.
* rip_interface.c: (rip_interface_multicast_set) Use new CONNECTED_ID
  macro to simplify logic.
  (rip_request_interface_send) Fix minor bug: ipv4_broadcast_addr does
  not give a useful result if prefixlen is 32 (we require a peer
  address in such cases).
* ripd.c: (rip_update_interface) Fix same bug as above.

17 years ago[0.99] Bump version to 0.99.6
Paul Jakma [Fri, 8 Dec 2006 21:27:08 +0000 (21:27 +0000)]
[0.99] Bump version to 0.99.6

2006-12-08 Paul Jakma <paul.jakma@sun.com>

* configure.ac: Bump to 0.99.6

17 years ago[isisd] Fix compiler warnings and allow v4-only compilation
Paul Jakma [Fri, 8 Dec 2006 01:09:50 +0000 (01:09 +0000)]
[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.

17 years ago[zebra] Changes of nexthops of static routes didnt take effect
Paul Jakma [Fri, 8 Dec 2006 00:53:14 +0000 (00:53 +0000)]
[zebra] Changes of nexthops of static routes didnt take effect

2006-12-08 Piotr Chytla <pch@packetconsulting.pl>

* zebra_rib.c: (static_install_ipv{4,6}) Case where existing
  RIB is updated must explicitely rib_addqueue the route_node,
  to ensure the update actually takes effect.

17 years ago[bgpd] Bug #302, bgpd can get stuck in state Clearing
Paul Jakma [Fri, 8 Dec 2006 00:31:22 +0000 (00:31 +0000)]
[bgpd] Bug #302, bgpd can get stuck in state Clearing

2006-12-07 Paul Jakma <paul.jakma@sun.com>

* bgp_fsm.c: Bug #302 fix, diagnosis, suggestions and testing
  by Juergen Kammer <j.kammer@eurodata.de>. Fix follows from
  his suggested fix, just made in a slightly different way.
  (bgp_event) Transitions into Clearing always must call
  bgp_clear_route_all().
  (bgp_stop) No need to clear routes here, BGP FSM should do
  it.

17 years ago[ospfd] Consider all connected addresses when creating ospf interfaces
Andrew J. Schorr [Mon, 4 Dec 2006 18:26:37 +0000 (18:26 +0000)]
[ospfd] Consider all connected addresses when creating ospf interfaces

2006-12-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospfd.c: (ospf_network_run) Remove an offending 'break' statement.
  Previously, after creating a single ospf_interface on a given
  network interface, the code would skip to the next interface
  without considering other connected addresses on the interface.
  After removing the 'break', we now consider all connected addresses.

17 years ago[bgpd] Implement 'debug bgp zebra' to log all messages to and from zebra.
Andrew J. Schorr [Thu, 30 Nov 2006 16:36:57 +0000 (16:36 +0000)]
[bgpd] Implement 'debug bgp zebra' to log all messages to and from zebra.

2006-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* bgp_debug.h: Declare new bgp_debug_zebra conf and term flags,
  and define BGP_DEBUG_ZEBRA.
* bgp_debug.c: Declare conf_bgp_debug_zebra and term_bgp_debug_zebra.
  (debug_bgp_zebra, no_debug_bgp_zebra, undebug_bgp_zebra) New
  functions to enable/disable bgp zebra debugging.
  (no_debug_bgp_all) Turn off zebra debugging.
  (show_debugging_bgp) Show whether zebra debugging is on.
  (bgp_config_write_debug) Add 'debug bgp zebra' if configured.
  (bgp_debug_init) Add new zebra debugging commands.
* bgp_zebra.c: (bgp_router_id_update, bgp_interface_add,
  bgp_interface_delete, bgp_interface_up, bgp_interface_down,
  bgp_interface_address_add, bgp_interface_address_delete,
  zebra_read_ipv4, zebra_read_ipv6, bgp_zebra_announce,
  bgp_zebra_withdraw, bgp_redistribute_set, bgp_redistribute_unset)
  If zebra debugging is enabled, log an appropriate debug message.

17 years ago[ospfd] Add debug messages for a few zebra messages that had been overlooked
Andrew J. Schorr [Thu, 30 Nov 2006 16:17:02 +0000 (16:17 +0000)]
[ospfd] Add debug messages for a few zebra messages that had been overlooked

2006-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_zebra.c: (ospf_router_id_update_zebra,
  ospf_interface_address_add, ospf_interface_address_delete)
  If (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) is enabled, then
  add a debug message about what Zebra is telling us.
  (ospf_zebra_add_discard) Add a debug message matching the one
  already in ospf_zebra_delete_discard.

17 years ago[bgpd] Fix bug where a deleted route that was quickly re-added was being lost
Andrew J. Schorr [Tue, 28 Nov 2006 19:50:46 +0000 (19:50 +0000)]
[bgpd] Fix bug where a deleted route that was quickly re-added was being lost

2006-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* bgp_route.c: (bgp_info_restore) New function that undoes
  the effects of a previous call to bgp_info_delete.  This is
  used when a route is deleted and quickly re-added before the
  deletion has been processed.
  (bgp_static_update_rsclient, bgp_static_update_main,
  bgp_redistribute_add) Check whether a pre-existing route
  has the BGP_INFO_REMOVED set, and, if so, we need to call
  bgp_info_restore to resurrect it.

17 years ago[ospfd] Fix bug in passive-interface default commands.
Andrew J. Schorr [Tue, 28 Nov 2006 16:36:39 +0000 (16:36 +0000)]
[ospfd] Fix bug in passive-interface default commands.

2006-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_vty.c: (ospf_passive_interface_default) Take additional
  'newval' arg so we can update ospf->passive_interface_default inside
  this function.  More importantly, we now call ospf_if_set_multicast
  on all ospf_interfaces.
  (ospf_passive_interface, no_ospf_passive_interface) Fix bug:
  for 'default' case, argv[0] is undefined, so we must test for
  (argc == 0) before using argv[0].  And since
  ospf_passive_interface_default now calls ospf_if_set_multicast as
  needed, we can just return after calling
  ospf_passive_interface_default.

17 years ago[bgpd] trivial: non C99 u_int.._t should be uint.._t
Paul Jakma [Fri, 27 Oct 2006 16:58:20 +0000 (16:58 +0000)]
[bgpd] trivial: non C99 u_int.._t should be uint.._t

2006-10-27 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: (bgp_table_stats) oops, u_intXX_t should be
  uintXX_t

17 years ago[ospfd] Stop losing subsequent default-information originate 'always' info
Andrew J. Schorr [Tue, 24 Oct 2006 19:04:26 +0000 (19:04 +0000)]
[ospfd] Stop losing subsequent default-information originate 'always' info

2006-10-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_zebra.c: (ospf_redistribute_default_set) Fix bug where
  a new value for ospf->default_originate was being ignored
  if a previous 'default-information originate' command
  had already been processed.

17 years ago[ospfd] Add passive-interface default support
Paul Jakma [Sun, 22 Oct 2006 20:07:53 +0000 (20:07 +0000)]
[ospfd] Add passive-interface default support

2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su>

* (general) Add support for passive-interface default (with
  minor edits by Paul Jakma).
* ospf_interface.h: Add OSPF_IF_PASSIVE_STATUS macro, looking
  at configured value, or the global 'default' value, as
  required.
* ospf_interface.c: (ospf_if_new_hook) Leave passive
  unconfigured per default, allowing global 'default' to
  take effect for unconfigured interfaces.
* ospf_packet.c: (various) use OSPF_IF_PASSIVE_STATUS
* ospf_vty.c: (ospf_passive_interface_default) new function,
  unset passive from all interfaces if default is enabled, as
  the per-iface settings become redundant.
  (ospf_passive_interface_update) new func, update passive
  setting taking global default into account.
  ({no,}ospf_passive_interface_addr_cmd) Add support for
  'default' variant of command.
  (show_ip_ospf_interface_sub) Update to take global
  default into account when printing passive status.
  (ospf_config_write) ditto.
* ospfd.c: (ospf_new) set global passive-interface default.
* ospfd.h: (struct ospf) Add field for global
          passive-interface.

17 years ago[bgpd] struct peer must have bgp field valid (redistribute crash)
Paul Jakma [Sun, 22 Oct 2006 19:13:07 +0000 (19:13 +0000)]
[bgpd] struct peer must have bgp field valid (redistribute crash)

2006-10-19 Paul Jakma <paul.jakma@sun.com>

* bgpd.c: (peer_new) bgp element of peer absolutely must be
  filled in, make peer_new() require it as argument and update
  all callers. Fixes a crash reported by Jan 'yanek' Bortl and
  Andrew Schorr where bgpd would crash in bgp_pcount_adjust
  trying to dereference the bgp member of bgp->peer_self,
  triggered through redistribution.
* bgp_route.c: (bgp_pcount_adjust) assert sanity of arguments.

17 years ago[bgpd] Coverity CID #64: Needless NULL check, CID #64: Deref of potentially NULL...
Paul Jakma [Sun, 15 Oct 2006 23:50:16 +0000 (23:50 +0000)]
[bgpd] Coverity CID #64: Needless NULL check, CID #64: Deref of potentially NULL pointer.

2006-10-15 Paul Jakma <paul.jakma@sun.com>

* bgp_packet.c: (bgp_update_packet) adv->rn can not be NULL,
  check is bogus - changed to assert(), CID#64.
  binfo is checked for NULL, but then dereferenced
  unconditionally, fix, CID #63.
  (bgp_withdraw_packet) Assert adv->rn is valid, as with
  bgp_update_packet().

17 years ago[bgpd] CID#73, potential crash in bgp statistics if called for AFI/SAFI with emtpy...
Paul Jakma [Sun, 15 Oct 2006 23:41:16 +0000 (23:41 +0000)]
[bgpd] CID#73, potential crash in bgp statistics if called for AFI/SAFI with emtpy table

2006-10-15 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: (bgp_table_stats_walker) NULL deref if table is
  empty, bgp_table_top may return NULL, Coverity CID#73.

17 years ago[bgpd] Bug #302 fixes. ClearingCompleted event gets flushed, leaving peers stuck...
Paul Jakma [Sun, 15 Oct 2006 23:39:59 +0000 (23:39 +0000)]
[bgpd] Bug #302 fixes. ClearingCompleted event gets flushed, leaving peers stuck in Clearing.

2006-10-14 Paul Jakma <paul.jakma@sun.com>

* bgp_fsm.h: Remove BGP_EVENT_FLUSH_ADD, dangerous and not
  needed.
* bgp_fsm.c: (bgp_stop) Move BGP_EVENT_FLUSH to the top of the
  of the function, otherwise it could flush a ClearingCompleted
          event, bug #302.
* bgp_packet.c: Replace all BGP_EVENT_FLUSH_ADD with
  BGP_EVENT_ADD, fixing bug #302.

17 years ago[daemon startup] Add --dry-run/-C argument to daemons, to check config file syntax
Paul Jakma [Sun, 15 Oct 2006 23:35:57 +0000 (23:35 +0000)]
[daemon startup] Add --dry-run/-C argument to daemons, to check config file syntax

2006-10-04 Oliver Hookins <ohookins@gmail.com>

* bgpd/bgp_main.c: Add configuration check option, with
'-C' rather than '-c' for consistency between daemons.
* isisd/isis_main.c: ditto
* ospf6d/ospf6_main.c: ditto
* ospfd/ospf_main.c: ditto
* ripngd/ripng_main.c: ditto
* vtysh/vtysh_main.c: ditto
* ripd/rip_main.c: Change the config check option to
'-C' and tidy up the code.
* zebra/main.c: ditto

2006-10-04 Stergiakis Alexandros <astergiakis@antcor.com>

* ripd/rip_main.c: This trivial patch introduces a new
  command-line option '-c', which instructs zebra/ripd
  to check its configuration file for validity, print
  any error message, and then exit. This is useful when
  the configuration file is edited by hand or otherwise,
  and you simply want to validate it without any other
  effect.
* zebra/main.c: ditto

17 years ago[lib] Handle upgrade from SUNWzebra to Quagga for 'interface fooX:Y' commands
Paul Jakma [Sun, 15 Oct 2006 23:33:50 +0000 (23:33 +0000)]
[lib] Handle upgrade from SUNWzebra to Quagga for 'interface fooX:Y' commands

2006-10-14 Paul Jakma <paul.jakma@sun.com>

* if.c: (general) Handle upgrades from SUNWzebra, which tried
  to track each logical interface as a seperate struct
  interface, to Quagga, which assigns only one struct interface
  per ifindex.
  (if_sunwzebra_get) Try decompose a logical interface name
          (fooX:Y) to the 'primary' name (fooX), for Solaris.
          (interface_cmd) Use if_sunwzebra_get on Solaris.

17 years ago[snmp] Fix asn_build calls to pass correct variable sizes (fixes 64-bit issues)
Andrew J. Schorr [Tue, 26 Sep 2006 15:30:43 +0000 (15:30 +0000)]
[snmp] Fix asn_build calls to pass correct variable sizes (fixes 64-bit issues)

2006-09-26 Pierre-Yves Ritschard <pierre-yves@spootnik.org>

* smux.c: (smux_open,smux_trap,smux_register) Fix various
  asn_build_* calls to pass the proper length in the final
  argument: use sizeof(<variable>) instead of sizeof(<type>),
  since there were several inconsistencies between the actual
  variable type and the size that was passed.  This should
  fix some problems on 64-bit architectures where sizeof(int)
  != sizeof(long).

17 years ago[ospfd] Improve some warning messages.
Andrew J. Schorr [Mon, 25 Sep 2006 13:26:14 +0000 (13:26 +0000)]
[ospfd] Improve some warning messages.

2006-09-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_packet.c: (ospf_packet_dup, ospf_make_md5_digest)
  Fix zlog_warn messages to eliminate compiler warnings.
  (ospf_hello) Improve warning messages to show why we
  are complaining.

17 years agoAdd recent NetBSD/FreeBSD versions to list of what ought to work.
Greg Troxel [Wed, 20 Sep 2006 14:46:07 +0000 (14:46 +0000)]
Add recent NetBSD/FreeBSD versions to list of what ought to work.
Add Dragonfly.

Clarify that the C99 requirement includes libraries and headers, not
just compiler.

17 years ago[bgpd] Trivial fix of printf format/arg mismatch
Andrew J. Schorr [Tue, 19 Sep 2006 18:51:53 +0000 (18:51 +0000)]
[bgpd] Trivial fix of printf format/arg mismatch

2006-09-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* bgpd.c: (peer_uptime) Fix printf format/arg mismatch in
  zlog_warn message (%ld/size_t -> %lu/u_long).

17 years ago[bgpd] reduce the process queue hold time to something more sensible
Paul Jakma [Thu, 14 Sep 2006 03:38:16 +0000 (03:38 +0000)]
[bgpd] reduce the process queue hold time to something more sensible

2006-09-14 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: (bgp_process_queue_init) process queue hold time
  too high, adds extra memory load. Change to be much lower,
  until such time as it's made configurable.

17 years ago[bgpd] RIB statistics address space size shouldnt double count space
Paul Jakma [Thu, 14 Sep 2006 03:06:54 +0000 (03:06 +0000)]
[bgpd] RIB statistics address space size shouldnt double count space

2006-09-14 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: (bgp_table_stats_walker) Address space announced
  should only count top-level unaggregateable prefixes, to
  avoid falling afoul of anti-dodgy-accounting regulations
  in various jurisdictions.. ;)

17 years ago[bgpd] simplify peer refcounts, squash slow peer leak
Paul Jakma [Thu, 14 Sep 2006 03:02:02 +0000 (03:02 +0000)]
[bgpd] simplify peer refcounts, squash slow peer leak

2006-09-14 Paul Jakma <paul.jakma@sun.com>

* (general) fix the peer refcount issue exposed by previous, by
  just removing refcounting of peer threads, which is mostly
  senseless as they're references leading from struct peer,
  which peer_free cancels anyway. No need to muck around..
* bgp_fsm.h: Just remove the refcounting from the various
  TIMER/READ/WRITE/EVENT ON/OFF/ADD macros.
* bgp_fsm.c: (bgp_stop) use BGP_EVENT_FLUSH, no refcounts attached
  to events anymore.
  (bgp_event) remove peer_unlock, events not refcounted.
* bgpd.c: (peer_free) flush events before free.

17 years ago[bgpd] Fix 0.99 shutdown regression, introduce Clearing and Deleted states
Paul Jakma [Thu, 14 Sep 2006 02:58:49 +0000 (02:58 +0000)]
[bgpd] Fix 0.99 shutdown regression, introduce Clearing and Deleted states

2006-09-14 Paul Jakma <paul.jakma@sun.com>

* (general) Fix some niggly issues around 'shutdown' and clearing
  by adding a Clearing FSM wait-state and a hidden 'Deleted'
  FSM state, to allow deleted peers to 'cool off' and hit 0
  references. This introduces a slow memory leak of struct peer,
  however that's more a testament to the fragility of the
  reference counting than a bug in this patch, cleanup of
  reference counting to fix this is to follow.
* bgpd.h: Add Clearing, Deleted states and Clearing_Completed
  and event.
* bgp_debug.c: (bgp_status_msg[]) Add strings for Clearing and
  Deleted.
* bgp_fsm.h: Don't allow timer/event threads to set anything
  for Deleted peers.
* bgp_fsm.c: (bgp_timer_set) Add Clearing and Deleted. Deleted
  needs to stop everything.
  (bgp_stop) Remove explicit fsm_change_status call, the
  general framework handles the transition.
  (bgp_start) Log a warning if a start is attempted on a peer
  that should stay down, trying to start a peer.
  (struct .. FSM) Add Clearing_Completed
  events, has little influence except when in state
  Clearing to signal wait-state can end.
  Add Clearing and Deleted states, former is a wait-state,
  latter is a placeholder state to allow peers to disappear
  quietly once refcounts settle.
  (bgp_event) Try reduce verbosity of FSM state-change debug,
  changes to same state are not interesting (Established->Established)
  Allow NULL action functions in FSM.
* bgp_packet.c: (bgp_write) Use FSM events, rather than trying
  to twiddle directly with FSM state behind the back of FSM.
  (bgp_write_notify) ditto.
  (bgp_read) Remove the vague ACCEPT_PEER peer_unlock, or else
  this patch crashes, now it leaks instead.
* bgp_route.c: (bgp_clear_node_complete) Clearing_Completed
  event, to end clearing.
  (bgp_clear_route) See extensive comments.
* bgpd.c: (peer_free) should only be called while in Deleted,
  peer refcounting controls when peer_free is called.
  bgp_sync_delete should be here, not in peer_delete.
  (peer_delete) Initiate delete.
  Transition to Deleted state manually.
  When removing peer from indices that provide visibility of it,
  take great care to be idempotent wrt the reference counting
  of struct peer through those indices.
  Use bgp_timer_set, rather than replicating.
  Call to bgp_sync_delete isn't appropriate here, sync can be
  referenced while shutting down and finishing deletion.
  (peer_group_bind) Take care to be idempotent wrt list references
  indexing peers.

17 years ago[bgpd] Add RIB reporting commands, show bgp ... statistics
Paul Jakma [Thu, 14 Sep 2006 02:56:07 +0000 (02:56 +0000)]
[bgpd] Add RIB reporting commands, show bgp ... statistics

2006-09-13 Paul Jakma <paul.jakma@sun.com>

* bgp_aspath.c: (aspath_highest) new, return highest ASN in an
  aspath.
* bgp_route.c: (bgp_peer_count_walker) new, do the walk done
  in bgp_peer_counts as a thread.
  (bgp_peer_counts) move walk to previous and call it via
  thread_execute so this RIB walk shows up in thread stats.
  (bgp_table_stats) New, gather some statistics for a given
  RIB.
  (bgp_table_stats_walker) New, RIB walker thread for former.
  (bgp_table_stats_vty) Parsing front-end for 'show bgp ...',
  useful model for future rationalisation of 'show ... bgp'.
  (bgp_route_init) Add new RIB stats commands.

17 years ago2006-09-13 Tom Everett <tom@khubla.com>
Greg Troxel [Wed, 13 Sep 2006 12:13:08 +0000 (12:13 +0000)]
2006-09-13 Tom Everett <tom@khubla.com>

        * kernel_socket.c (rtm_type_str): ifdef RTM_OLD{ADD,DEL} to
        compile on systems that no longer define them.

17 years ago[ripd] bug #293: routemap set metric doesn't check for underflow correctly
Paul Jakma [Mon, 11 Sep 2006 02:14:16 +0000 (02:14 +0000)]
[ripd] bug #293: routemap set metric doesn't check for underflow correctly

2006-09-11 Paul Jakma <paul.jakma@sun.com>

* rip_routemap.c: (route_set_metric) underflow check needs to
  use signed, problem identified and diagnosed by Pavel
  Nikiforov in bug #293.

17 years ago[ripd] bug #278: remove gratuitous use of mid-function declaration
Paul Jakma [Mon, 11 Sep 2006 02:10:40 +0000 (02:10 +0000)]
[ripd] bug #278: remove gratuitous use of mid-function declaration

2006-09-11 Paul Jakma <paul.jakma@sun.com>

* ripd.c: (rip_read) remove gratuitous use of mid-function
  declaration of vrecv, bug #278.

17 years ago[bgpd] Handle pcount as flags are changed, fixing pcount issues
Paul Jakma [Thu, 7 Sep 2006 00:24:49 +0000 (00:24 +0000)]
[bgpd] Handle pcount as flags are changed, fixing pcount issues

2006-09-06 Paul Jakma <paul.jakma@sun.com>

* (general) Squash any and all prefix-count issues by
  abstracting route flag changes, and maintaining count as and
  when flags are modified (rather than relying on explicit
  modifications of count being sprinkled in just the right
  places throughout the code).
* bgp_route.c: (bgp_pcount_{dec,inc}rement) removed.
  (bgp_pcount_adjust) new, update prefix count as
  needed for a given route.
  (bgp_info_{uns,s}et_flag) set/unset a BGP_INFO route status
  flag, calling previous function when appropriate.
  (general) Update all set/unsets of flags to use previous.
  Remove pcount_{dec,inc}rement calls.
  No need to unset BGP_INFO_VALID in places where
  bgp_info_delete is called, it does that anyway.
* bgp_{damp,nexthop}.c: Update to use bgp_info_{un,}set_flag.
* bgp_route.h: Export bgp_info_{un,}set_flag.
  Add a 'meta' BGP_INFO flag, BGP_INFO_UNUSEABLE.
  Move BGP_INFO_HOLDDOWN macro to here from bgpd.h

17 years ago[bgpd] Add 'show ... neighbor .... prefix-counts' command
Paul Jakma [Mon, 4 Sep 2006 01:10:36 +0000 (01:10 +0000)]
[bgpd] Add 'show ... neighbor .... prefix-counts' command

2006-09-03 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: Add 'show ... bgp ... <neighbour> prefix-count'
  commands, to provide detailed counts of prefixes for a peer.
  Informative, and should help pin down to pfxcnt drift
  problems.

17 years ago[ospfd] Fix assertion in DB-exchange fix, hit by ogier-db-ex-opt commit
Paul Jakma [Wed, 30 Aug 2006 18:47:37 +0000 (18:47 +0000)]
[ospfd] Fix assertion in DB-exchange fix, hit by ogier-db-ex-opt commit

2006-08-28 Andy Gay <andy@andynet.net>

* ospf_packet.c: (ospf_make_db_desc) Assert added with More-bit
  fixes does not hold up with addition of Ogier DB-Exchange
  optimisation, which can empty the db-summary list in between
  sent DD packets. Remove assert, update More-bit always when
  in Exchange.

17 years ago[0.99] version bump to 0.99.5
Paul Jakma [Sun, 27 Aug 2006 22:06:12 +0000 (22:06 +0000)]
[0.99] version bump to 0.99.5

2006-08-27 Paul Jakma <paul.jakma@sun.com>

* configure.ac: Bump to 0.99.5

17 years ago[ospfd] redistribute default no longer works after complete reconfig, fix
Paul Jakma [Sun, 27 Aug 2006 08:01:20 +0000 (08:01 +0000)]
[ospfd] redistribute default no longer works after complete reconfig, fix

2006-08-27 J.J. Krabbendam <jkrabbendam@aimsys.nl>

* ospfd.c: (ospf_finish_final) default redistribute should be
  unset too, fixes bug where reconfiguring ospfd completely
  can no longer enable default redistribution.

17 years ago[bgpd] fix mtype in XFREE and NULL out freed pointer
Paul Jakma [Sun, 27 Aug 2006 06:57:47 +0000 (06:57 +0000)]
[bgpd] fix mtype in XFREE and NULL out freed pointer

2006-08-27 Paul Jakma <paul.jakma@sun.com>

* bgp_advertise.c: (bgp_sync_delete) fix mtype in XFREE.
  NULL out peer->hash after free, to be sure.

17 years ago[tests] update heavywq for workqueue api changes
Paul Jakma [Sun, 27 Aug 2006 06:53:24 +0000 (06:53 +0000)]
[tests] update heavywq for workqueue api changes

2006-08-26 Paul Jakma <paul.jakma@sun.com>

* heavy-wq.c: (slow_func_del,slow_func) update to match workqueue
  changes

17 years ago[ospfd] Bug #134, ospfd should be more robust to backward time change
Paul Jakma [Sun, 27 Aug 2006 06:49:29 +0000 (06:49 +0000)]
[ospfd] Bug #134, ospfd should be more robust to backward time change

2006-08-25 Paul Jakma <paul.jakma@sun.com>

* (general) Bug #134. Be more robust to backward time changes,
  use the newly added libzebra time functions.
  In most cases: recent_time -> recent_relative_time()
  gettimeofday -> quagga_gettime (QUAGGA_CLK_MONOTONIC, ..)
  time -> quagga_time.
  (ospf_make_md5_digest) time() call deliberately not changed.
  (ospf_external_lsa_refresh) remove useless gettimeofday, LSA
  tv_orig time was already set in ospf_lsa_new, called via
  ospf_external_lsa_new.

17 years ago[lib] Bug #134: threads should be more robust against backward time jumps
Paul Jakma [Sun, 27 Aug 2006 06:44:02 +0000 (06:44 +0000)]
[lib] Bug #134: threads should be more robust against backward time jumps

2006-08-25 Paul Jakma <paul.jakma@sun.com>

* thread.c: (general) Add support for monotonic clock, it may still
  jump forward by huge amounts, but should be immune to going
  backwards. Fixes bug #134.
  (quagga_gettimeofday_relative_adjust) helper, does what name
  says - adjusts gettimeofday based relative timer.
  (quagga_gettimeofday) helper to keep recent_time up to date.
  (quagga_get_relative) helper, update and getch the relative
  timer using gettimeofday(). POSIX CLOCK_MONOTONIC is also
  supported, but the code is not enabled yet nor tested.
  (quagga_real_stabilised) helper, retrieve absolute time but
  stabilised so as to never decrease.
  (quagga_gettime) Exported interface, analogous to POSIX
  clock_gettime() in interface, supporting several clocks.
  (quagga_time) Exported interface, analogous to traditional
  time(), will never decrease.
  (recent_relative_time) Convenience function to retrieve
  relative_time timeval, similar to existing recent_time absolute
  timeval, for when an approximately recent value will do.
  (remainder) Update to use above helpers.
  (thread_getrusage) Previously was a macro, but needs to be
  a function to twiddle with thread.c private stuff.
* thread.c: Point the GETRUSAGE macro at previous function.
  Export quagga_gettime, quagga_time and recent_relative_time for
  general use.

17 years ago[ospfd] draft-ogier-ospf-dbex-opt DB-exchange optimisation
Paul Jakma [Sun, 27 Aug 2006 06:40:04 +0000 (06:40 +0000)]
[ospfd] draft-ogier-ospf-dbex-opt DB-exchange optimisation

2006-08-03 Paul Jakma <paul.jakma@sun.com>

* ospf_packet.c: (ospf_make_db_desc) Implement
  draft-ogier-ospf-dbex-opt DB-exchange optimisation.

17 years ago[ospfd] Raise ExchangeDone earlier, avoid often needless round of DD packets
Paul Jakma [Sun, 27 Aug 2006 06:29:30 +0000 (06:29 +0000)]
[ospfd] Raise ExchangeDone earlier, avoid often needless round of DD packets

2006-08-03 Paul Jakma <paul.jakma@sun.com>

* ospf_packet.c: (ospf_make_db_desc) Unset the DD More bit
  after constructing the packet, if appropriate.
  (ospf_db_desc_proc) Speed up Exchange, slave should raise
  ExchangeDone earlier, as RFC mandates, by forming its reply
  before deciding whether both sides are done, avoids a
  needless round of empty DD packet exchanges at the end of
  Exchange, hence speeding up ExchangeDone.
  (ospf_db_desc) use UNSET_FLAG macro.

17 years ago[ospfd] trivial: consolidate LSDB delete code into single function
Paul Jakma [Sun, 27 Aug 2006 06:24:34 +0000 (06:24 +0000)]
[ospfd] trivial: consolidate LSDB delete code into single function

2006-08-04 Paul Jakma <paul.jakma@sun.com>

* ospf_lsdb.c: (ospf_lsdb_delete_entry) new function, consolidate
  exact same functionality replicated in other functions.
  (ospf_lsdb_add) Strip out code by using ospf_lsdb_delete_entry.
  (ospf_lsdb_delete) ditto.
  (ospf_lsdb_delete_all) ditto.

17 years ago[zebra] trivial: rtadv.h depends on interface.h
Paul Jakma [Sun, 6 Aug 2006 16:02:43 +0000 (16:02 +0000)]
[zebra] trivial: rtadv.h depends on interface.h

2006-08-06 Paul Jakma <paul.jakma@sun.com>

* rtadv.h: depends on interface.h, so should include it.

17 years ago[zebra] fix inconsistencies in ifstat_update_* declarations and definitions
Paul Jakma [Sun, 6 Aug 2006 15:57:59 +0000 (15:57 +0000)]
[zebra] fix inconsistencies in ifstat_update_* declarations and definitions

2006-08-06 Paul Jakma <paul.jakma@sun.com>

* interface.h: (ifstat_update_proc) declaration should match
  ifstat_update_sysctl really, which is to not return status, as
  such status is not used anywhere.
* if_{proc,sysctl}.c: Make ifstat_update_* definitions and return values
  consistent with each other and their declarations, ie:
  (void) (*) (void).

17 years ago[bgpd] aspath_loop_check was broken, fix it and the aspath unit test code.
Paul Jakma [Sun, 6 Aug 2006 15:52:11 +0000 (15:52 +0000)]
[bgpd] aspath_loop_check was broken, fix it and the aspath unit test code.

2006-08-06 Paul Jakma <paul.jakma@sun.com>

* bgp_aspath.c: (aspath_loop_check) Fix the typo-bug which
  essentially had disabled this check. Problem reported by
  Bartek Kania <mrbk@gnarf.org> in [quagga-users 7388].
* aspath_test.c: (validate) Fix the sense of the aspath_loop_check,
  which was the wrong way around and had actually been testing for
  aspath_loop_check to be buggy.

17 years ago[zebra] IRDP: Move stream_free to where its created, probably fixing a leak
Paul Jakma [Fri, 4 Aug 2006 06:18:04 +0000 (06:18 +0000)]
[zebra] IRDP: Move stream_free to where its created, probably fixing a leak

2006-08-01 Paul Jakma <paul.jakma@sun.com>

* irdp_main.c: (irdp_advertisement) free the stream here, when done,
  right under where it was allocated so it's blindingly obvious
  it's correct. This possibly fixes a very slow leak of streams in
  zebra.
* irdp_packet.c: (send_packet) don't free the stream here as
  it's hard to tell if right, plus an error case seemed to
  returning before free anyway.

17 years ago[zebra] add more stuff to misc_null to avoid compile breakages
Paul Jakma [Fri, 4 Aug 2006 06:14:13 +0000 (06:14 +0000)]
[zebra] add more stuff to misc_null to avoid compile breakages

2006-08-04 Paul Jakma <paul.jakma@sun.com>

* misc_null.c: Add ifstat_update_sysctl, add another required
  header.

17 years ago[testzebra] Patch to misc_null.c to get older gcc to recognize #pragma tricks
Andrew J. Schorr [Wed, 2 Aug 2006 16:47:03 +0000 (16:47 +0000)]
[testzebra] Patch to misc_null.c to get older gcc to recognize #pragma tricks

2006-08-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* misc_null.c: Must include header files to get older versions of gcc
  to process the #pragma statements properly.

17 years ago[doc] Expand/cross-ref MD5 commands, tweak anchors to avoid added spacing
Paul Jakma [Fri, 28 Jul 2006 04:42:39 +0000 (04:42 +0000)]
[doc] Expand/cross-ref MD5 commands, tweak anchors to avoid added spacing

2006-07-28 Paul Jakma <paul.jakma@sun.com>

* main.texi: link-detect works on Solaris too.
* ospfd.texi: Twiddle around with anchors a bit more.
  Clarify how setting MD5 auth by area and by interface interact,
  and add cross-references, as well as to the required
  command for setting key material.

17 years ago[doc] minor tweaks, refine ospf redist,passive-inter, and abr-type help
Paul Jakma [Thu, 27 Jul 2006 23:30:16 +0000 (23:30 +0000)]
[doc] minor tweaks, refine ospf redist,passive-inter, and abr-type help

2006-07-27 Paul Jakma <paul.jakma@sun.com>

* quagga.texi: Remove unused index definitions
  Add an Index node - for the concept index.
* routeserver.texi: Set exampleindex to 0, so the example configs
  with long IPv6 addresses stand better chance of fitting.
* overview.texi: 'Supported RFC' -> 'Supported RFCs'
  Remove paragraph indentation - texinfo does that.
  Revise the supported OS list slightly.
  Remove the IPv6 stack list, seems very dated and irrelevant.
  Revise the 'How to get Quagga' section.
* ospfd.texi: minor tweaks: add some anchors, fix some minor
  format issues.
  Revise the help for 'abr-type'.
  Note that text authentication is unwise, recc'd MD5.
  Add some extra text for redistribute and passive-interface,
  about how latter can substitute for redist connected.

17 years ago[lib] remove autogenerated file, update .cvsignore
Paul Jakma [Thu, 27 Jul 2006 22:52:17 +0000 (22:52 +0000)]
[lib] remove autogenerated file, update .cvsignore

17 years ago[ospfd] Bug #288: do not change router ID unless forced by manual configuration
Andrew J. Schorr [Thu, 27 Jul 2006 22:29:06 +0000 (22:29 +0000)]
[ospfd] Bug #288: do not change router ID unless forced by manual configuration

2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospfd.c: (ospf_router_id_update) Fix and document the algorithm for
  selecting the router ID: if there is not a statically configured ID,
  then stick to the most recent value to avoid disruptive changes.
  This should fix bug #288.

17 years ago[zebra] Bug #268, Fix race between add/delete of routes, sanitise rib queueing
Paul Jakma [Thu, 27 Jul 2006 21:49:00 +0000 (21:49 +0000)]
[zebra] Bug #268, Fix race between add/delete of routes, sanitise rib queueing

2006-07-27 Paul Jakma <paul.jakma@sun.com>

* rib.h: (struct rib) Add a route_node rn_status flag field,
  this has to be copied every time head RIB of a route_node
  changes.
  Remove the rib lock field, not needed - see below.
  Add a status field for RIB-private flags.
* zebra_rib.c: Add a global for the workqueue hold time, useful
  for testing.
  (general) Fix for bug #268. Problem originally
  detailed by Simon Bryden in [quagga-dev 4001].
  Essentially, add/delete of a RIB must happen /before/ the
  queue. Best-path selection (ie rib_process) and reaping of
  freed RIBs can then be done after queueing. Only the route_node
  is queued - no important RIB state (i.e. whether a RIB is to be
  deleted) is queued.
  (struct zebra_queue_node_t) Disappears, no longer need to
  track multiple things on the queue, only the route_node.
  (rib_{lock,unlock}) removed, RIBs no longer need to be
  refcounted, no longer queued.
  (rib_queue_qnode_del) Removed, deleted RIBs no longer deleted
  via the queue.
  (rib_queue_add_qnode) deleted
  (rib_queue_add) Only the route_node is queued for best-path
  selection, we can check whether it is already queued or
  not and avoid queueing same node twice - struct rib * argument
  is not needed.
  (rib_link/unlink) (un)link RIB from route_node.
  (rib_{add,del}node) Front-end to updates of a RIB.
  (rib_process) Reap any deleted RIBs via rib_unlink.
  Unset the route_node 'QUEUED' flag.
  (General) Remove calls to rib_queue_add where add/del node was
  called - not needed, update calls where not.
  Ignore RIB_ENTRY_REMOVEd ribs in loops through route_nodes

17 years ago[zebra] Add 'debug zebra rib' commands
Paul Jakma [Thu, 27 Jul 2006 21:35:33 +0000 (21:35 +0000)]
[zebra] Add 'debug zebra rib' commands

2006-07-27 Paul Jakma <paul.jakma@sun.com>

* debug.{c,h}: Add 'debug zebra rib' and 'debug zebra rib queue'.

17 years ago[zebra] Add test rig code, for testing the zebra RIB
Paul Jakma [Thu, 27 Jul 2006 19:59:58 +0000 (19:59 +0000)]
[zebra] Add test rig code, for testing the zebra RIB

2006-07-27 Paul Jakma <paul.jakma@sun.com>

* {ioctl,kernel}_null.c: Dummy/Null kernel method implementations,
  useful for testing zebra code that calls such methods.
* {redistribute,misc}_null.c: Dummy/Null methods, as above. But
  for zclient, and for various misc functions.
* test_main.c: Test harness for zebra, currently just to test the
  RIB.
* Makefile.am: Build testzebra using above.
* zebra_rib.c: Add a global for the workqueue hold time, useful
  for testing.

17 years ago[bgpd] Potential bug#287 fix, peer_delete should NULL out freed buffers
Paul Jakma [Thu, 27 Jul 2006 19:05:12 +0000 (19:05 +0000)]
[bgpd] Potential bug#287 fix, peer_delete should NULL out freed buffers

2006-07-27 Paul Jakma <paul.jakma@sun.com>

* bgpd.c: (peer_delete) Ensure freed buffers can not be
  accidently reused. A potential fix for bug #287.

17 years ago[vtysh] Never skip authentication, and add support for multiple -c commands
Andrew J. Schorr [Thu, 27 Jul 2006 18:01:41 +0000 (18:01 +0000)]
[vtysh] Never skip authentication, and add support for multiple -c commands

2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* vtysh.1: Document new options -d and -E, and note that now multiple
  -c options may be supplied, with embedded linefeed now supported.
  In BUGS section, remove warning about vtysh causing a daemon
  to freeze, since this has been fixed.
* vtysh_main.c: (usage) Add new -d and -E options.  And note that
  -c can be used multiple times, possibly with embedded linefeeds.
  (longopts) Add new -d and -E options.
  (main) Add new -d and -E options, and create a linked list to
  support multiple -c options.  Do not call vtysh_connect_all until
  after vtysh_read_config(config_default) and vtysh_auth have
  succeeded.  This prevents the vtysh.conf file from configuring
  any daemons, and it ensures that authentication has been passed
  before we send any commands to any daemons.  Call vtysh_connect_all
  with any daemon name supplied with -d.  If it is unable to connect
  to any daemons, issue an error message and exit immediately.
  When used in -c mode, call vtysh_execute("enable") before
  executing the commands in order to match interactive behavior.
  And detect embedded linefeed chars in -c commands and break them up
  appropriately.
* vtysh.h: (vtysh_connect_all) Fix proto to reflect new
  daemon_name argument, and that it now returns an integer -- the
  number of daemons to which we were able to connect.
* vtysh.c: (vtysh_connect_all) Add a new daemon_name argument.
  If supplied, connect only to that daemon.  And return
  the number of daemons to which we were able to connect.
  (vtysh_prompt): Performance enhancement -- make struct utsname
  static so we call uname to get the hostname only once.

17 years ago[zebra] Connected routes must always be added to main table
Paul Jakma [Thu, 27 Jul 2006 16:11:02 +0000 (16:11 +0000)]
[zebra] Connected routes must always be added to main table

2006-07-27 Rumen Svobodnikov <rumen@telecoms.bg>

* connected.c: (connected_up_ipv4) interface connected routes always
  go to table main (or otherwise they cannot be used by linux as
          nexthops)
* zserv.c: (zread_ipv4_add) send route to the correct routing table
* zebra_rib.c (static_install_ipv4) set routing table

17 years ago[ospfd] Allow ospf_lsa_unlock to NULL out callers' LSA pointers upon free
Paul Jakma [Wed, 26 Jul 2006 09:37:26 +0000 (09:37 +0000)]
[ospfd] Allow ospf_lsa_unlock to NULL out callers' LSA pointers upon free

2006-07-26 Paul Jakma <paul.jakma@sun.com>

* ospf_lsa.{c,h}: (ospf_lsa_unlock) Change to take a double pointer
  to the LSA to be 'unlocked', so that, if the LSA is freed, the
  callers pointer to the LSA can be NULLed out, allowing any further
  use of that pointer to provoke a crash sooner rather than later.
* ospf_*.c: (general) Adjust callers of ospf_lsa_unlock to match
  previous. Try annotate 'locking' somewhat to show which 'locks'
  are protecting what LSA reference, if not obvious.
* ospf_opaque.c: (ospf_opaque_lsa_install) Trivial: remove useless
  goto, replace with return.
* ospf_packet.c: (ospf_make_ls_ack) Trivial: merge two list loops,
  the dual-loop predated the delete-safe list-loop macro.

17 years ago[ospfd] Additional NSM neighbour state change stats/information
Paul Jakma [Tue, 25 Jul 2006 20:44:12 +0000 (20:44 +0000)]
[ospfd] Additional NSM neighbour state change stats/information

2006-07-25 Paul Jakma <paul.jakma@sun.com>

* ospf_neigbor.h: (struct ospf_neighbor) Add some additional
  neighbour state statistics fields, timestamps for progressive
  and regressive state changes, and pointer to event string
  for the latter state change.
* ospf_nsm.c: (nsm_notice_state_change) Update new state changs
  history as required.
* ospf_vty.c: (show_ip_ospf_neighbor_detail_sub) Print out above
  new per-neighbour state change stats.

17 years ago[lib] Optimise thread_call by caching pointer to thread history in the thread
Paul Jakma [Tue, 25 Jul 2006 20:40:40 +0000 (20:40 +0000)]
[lib] Optimise thread_call by caching pointer to thread history in the thread

2006-07-25 Paul Jakma <paul.jakma@sun.com>

* thread.h: (struct thread) Add a cache pointer to the struct
  cpu_thread_history, if it is known - saving hash lookup on
  each thread_call.
* thread.c: (thread_call) Cache the pointer to the
          cpu_thread_history, so that future thread_calls of same
          thread can avoid the hash_lookup.

17 years ago[ospfd] record timestamp and event of last NSM state change for neighbour
Paul Jakma [Tue, 11 Jul 2006 17:57:25 +0000 (17:57 +0000)]
[ospfd] record timestamp and event of last NSM state change for neighbour

2006-07-10 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (ospf_nsm_event) Record state change timestamp
  and event in nbr struct.
* ospf_neighbor.h: (struct ospf_neighbor) Add fields to record
  timestamp of last NSM change and event.
* ospf_vty.c: (show_ip_ospf_neighbor_detail_sub) Print
  last state change timestamp and event, if available.

17 years ago[ospfd] trivial: NSM AdjChange should print event, declutter core functions
Paul Jakma [Tue, 11 Jul 2006 17:52:53 +0000 (17:52 +0000)]
[ospfd] trivial: NSM AdjChange should print event, declutter core functions

2006-07-10 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (nsm_notice_state_changes) Move state change
  logging code to new func to declutter nsm_change_state and
  ospf_nsm_event.
  Log event with AdjChange, it's useful to know.
  (nsm_change_state) move adjchange and snmp logging to previous.
  (ospf_nsm_event) call nsm_notice_state_changes from here.
  Move the debug message to entry of function, so it gets out
  even if something goes wrong.

17 years ago[ospfd] Remove nsm_reset_nbr and a bunch of useless NSM event/action functions
Paul Jakma [Tue, 11 Jul 2006 17:49:22 +0000 (17:49 +0000)]
[ospfd] Remove nsm_reset_nbr and a bunch of useless NSM event/action functions

2006-07-10 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (nsm_change_state) call nsm_clear_adj for all
  adjacency losses, hence removing need for nsm_reset_nbr.
  (nsm_reset_nbr) kill it, clear_adj in previous does fine.
  (nsm_kill_nbr,nsm_start) remove nsm_reset_nbr call.
  (ospf_nsm_event) Allow NSM function to be NULL, this along with
  removal of nsm_reset_nbr, allows a bunch of now useless functiosn
  to be removed.
  Remove some useless variables.
  (nsm_ignore) now useless, remove.
  (nsm_bad_ls_req) ditto
  (nsm_seq_number_mismatch)   "
  (nsm_oneway_received)       "
  (nsm_inactivity_timer)      "
  (nsm_ll_down)               "
  (NSM) replace removed action functions with NULL.

17 years ago[ospfd] Improve Hello NetworkMask mismatch warning to give more info
Andrew J. Schorr [Tue, 11 Jul 2006 01:50:30 +0000 (01:50 +0000)]
[ospfd] Improve Hello NetworkMask mismatch warning to give more info

2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_packet.c: (ospf_hello) Improve NetworkMask mismatch warning
  message to include interface name and conflicting prefix lengths.

17 years ago[lib] Do not call vty_close in vty_log_out to avoid possible free memory access
Andrew J. Schorr [Tue, 11 Jul 2006 00:06:49 +0000 (00:06 +0000)]
[lib] Do not call vty_close in vty_log_out to avoid possible free memory access

2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* vty.c: (vty_log_out) Do not call vty_close, because this could
  result in a parent function's accessing the freed memory.
  Instead, set status VTY_CLOSE and call shutdown(vty->fd, SHUT_RDWR).
  And add a comment on vty_close.

17 years ago[lib] Fix infinite recursion for errors on vtys with terminal monitor enabled
Andrew J. Schorr [Mon, 10 Jul 2006 18:09:42 +0000 (18:09 +0000)]
[lib] Fix infinite recursion for errors on vtys with terminal monitor enabled

2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* vty.c: (vty_log_out, vty_read, vty_flush, vtysh_flush, vtysh_read)
  After an I/O error, must set vty->monitor to 0 before calling
  zlog_warn, otherwise an infinite recursion could occur
  (since zlog_warn triggers a message to be written to the vty,
  and that in turn triggers another error message when it fails, etc.).

17 years ago[ospfd] cleanup NSM neighbour delete through a new Deleted NSM state
Paul Jakma [Mon, 10 Jul 2006 07:45:13 +0000 (07:45 +0000)]
[ospfd] cleanup NSM neighbour delete through a new Deleted NSM state

2006-07-07 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.h: Add a NSM_Deleted neighbour state, to act as dummy
  state indicating the neighbour is to be deleted.
* ospf_nsm.c: (general) Use the NSM_Deleted state to delete
  neighbours, thus allowing code to be slightly more obvious
  in its flow.
  (nsm_timer_set) Add NSM_Deleted. Add another timer the code
  missed.
  (nsm_kill_nbr) No need for special case call to nsm_change_state
  anymore.
  Make the assert and error-handling for same case more readable
  (Andrew Schorr)
  Remove the call to ospf_nbr_delete, nsm_change_state can do
  this generally now via NSM_Deleted.
  (struct ... NSM) Add the dummy NSM_Deleted state, the 3 events
  that can lead to nsm_kill_nbr all now transition the NBR to
  NSM_Deleted and the general change_state function can be left
  to do the work.
  (ospf_nsm_event) Special casing of events and early-return can
  be removed now.
  On transition into Deleted, delete the nbr.
* ospf_dump.c: (ospf_nsm_state_msg) Add Deleted.

17 years ago[ospfd] early-return in nsm_event missed LLDown event, fixes use after free
Paul Jakma [Thu, 6 Jul 2006 11:12:39 +0000 (11:12 +0000)]
[ospfd] early-return in nsm_event missed LLDown event, fixes use after free

2006-07-06 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (ospf_nsm_event) LLDown event also results in nbr
  being deleted, requires early-return too. Likely explains
  some crash reports after interface events.

17 years ago[doc] remove the auto-generated quagga.info file from CVS
Paul Jakma [Tue, 4 Jul 2006 14:41:08 +0000 (14:41 +0000)]
[doc] remove the auto-generated quagga.info file from CVS

2006-07-04 Paul Jakma <paul.jakma@sun.com>

* quagga.info: remove auto-generated file. It will still be
  present in dist tarballs, so shouldn't affect anyone but
  direct users of CVS. Required texinfo version should be
  widely available.
* .cvsignore: ignore quagga.info

17 years ago[ospfd] Apply some simplifications to ospf_nsm, from Andrew's suggestions
Paul Jakma [Tue, 4 Jul 2006 13:57:49 +0000 (13:57 +0000)]
[ospfd] Apply some simplifications to ospf_nsm, from Andrew's suggestions

2006-07-04 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (general) Various small cleanups from Andrew's
  review of last set of patches.
  (nsm_timer_set) Loading, Full and default can share
  same code too.
  (nsm_should_adj) Can just be one big OR.
  (nsm_twoway_received) Collapse into return statement.

17 years ago[ospfd] CID #13, dont try print out fields of LSA we know to be NULL.
Paul Jakma [Tue, 4 Jul 2006 13:52:29 +0000 (13:52 +0000)]
[ospfd] CID #13, dont try print out fields of LSA we know to be NULL.

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* ospf_lsa.c: (ospf_translated_nssa_refresh) CID #13.

17 years ago[ospfd] Clear adjacency state for NSM changes down to TwoWay/ExStart
Paul Jakma [Tue, 4 Jul 2006 13:50:44 +0000 (13:50 +0000)]
[ospfd] Clear adjacency state for NSM changes down to TwoWay/ExStart

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (nsm_clear_adj) clear adjacency related state for a
  neighbour, needed for some state changes from > ExStart down
  to ExStart or less, which need not go through nsm_reset_nbr.
  (nsm_reset_nbr) move code to former. Should be static.
  (ospf_nsm_event) Remove long dead code.
  Use nsm_clear_adj for state changes that take down
  adjacencies to TwoWay/ExStart.
  (nsm_kill_nbr) Oops, action function shouldn't try return
  1 for error.

17 years ago[ospfd] trivial cleanup of nsm_timer_set
Paul Jakma [Tue, 4 Jul 2006 13:46:14 +0000 (13:46 +0000)]
[ospfd] trivial cleanup of nsm_timer_set

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (nsm_timer_set) ls_req timer should be OFF in
  early states.
  Compact several identical sections.
  Set inactivity timer to OFF for Down, for documentary purposes.

17 years ago[ospfd] Ensure NSM state functions can redirect next_state accidently
Paul Jakma [Tue, 4 Jul 2006 13:44:19 +0000 (13:44 +0000)]
[ospfd] Ensure NSM state functions can redirect next_state accidently

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (ospf_nsm_event) Don't allow action functions to
  change next_state if the NSM tables do not indicate
  next_state is conditional, log warning if one tries -
  existing code appears fine though.

17 years ago[ospfd] consolidate adjacency check logic
Paul Jakma [Tue, 4 Jul 2006 13:35:24 +0000 (13:35 +0000)]
[ospfd] consolidate adjacency check logic

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* ospf_nsm.c: (nsm_should_adj) New function, just consolidate the
  10.4 adjacency check from nsm_twoway_received/nsm_adj_ok.
  (nsm_twoway_received/nsm_adj_ok) Use former.

17 years ago[debug] Debug messages to terminal vty sessions should include timestamps
Andrew J. Schorr [Mon, 3 Jul 2006 20:58:29 +0000 (20:58 +0000)]
[debug] Debug messages to terminal vty sessions should include timestamps

2006-07-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* vty.c: (vty_log_out) Debug messages to terminal vty sessions
  should include timestamps.

17 years ago[zebra] Fix CID #104, check addr for null, and #18, check nexthop type args
Paul Jakma [Sun, 2 Jul 2006 16:38:54 +0000 (16:38 +0000)]
[zebra] Fix CID #104, check addr for null, and #18, check nexthop type args

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* rt_netlink.c: (netlink_interface_addr) Fix CID #104, can not
  proceed if addr is NULL.
* zebra_rib.c: (static_add_ipv6) Fix CID #18, double check
  required arguments are supplied for the given nexthop type.

17 years ago[bgpd] Fix crash on shutdown of peer
Paul Jakma [Sun, 2 Jul 2006 11:01:50 +0000 (11:01 +0000)]
[bgpd] Fix crash on shutdown of peer

2006-07-02 Paul Jakma <paul.jakma@sun.com>

* bgp_fsm.c: (bgp_{stop,start}) Move clear/free of certain
  bits of state from stop to start, as they may be used via
  peer references on clearing queues..

17 years ago[ripd] update to use auto-generated redistribute route-type defs
Paul Jakma [Fri, 30 Jun 2006 16:58:53 +0000 (16:58 +0000)]
[ripd] update to use auto-generated redistribute route-type defs

2006-06-29 Paul Jakma <paul.jakma@sun.com>

* rip_zebra: (general) convert redistribute commands to use
  the auto-generated defines.

17 years ago[lib] Fix merge error in ChangeLog
Paul Jakma [Fri, 30 Jun 2006 16:55:41 +0000 (16:55 +0000)]
[lib] Fix merge error in ChangeLog

- entry was left in wrong order, according to date.

17 years ago[ospfd] Fix "show ip ospf neighbor A.B.C.D" to show all matches
Andrew J. Schorr [Fri, 30 Jun 2006 16:53:47 +0000 (16:53 +0000)]
[ospfd] Fix "show ip ospf neighbor A.B.C.D" to show all matches

2006-06-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_vty.c: (show_ip_ospf_neighbor_id) Should show all instances
  of that neighbor (since it may appear on multiple interfaces)
  instead of bailing out after showing the first match.

17 years ago[lib] Fix typo in cpp conditional for malloc.h include
Paul Jakma [Fri, 30 Jun 2006 16:49:02 +0000 (16:49 +0000)]
[lib] Fix typo in cpp conditional for malloc.h include

2006-06-28 Paul Jakma <paul.jakma@sun.com>

* memory.c: Fix typo in cpp conditional around malloc.h, from
  comment in bug #269.

17 years ago[ospfd] Avoid getting NSM stuck in ExStart by using local view of DR/BDR
Andrew J. Schorr [Fri, 30 Jun 2006 03:21:05 +0000 (03:21 +0000)]
[ospfd] Avoid getting NSM stuck in ExStart by using local view of DR/BDR

2006-06-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_nsm.c: (nsm_twoway_received) When deciding whether to
  change from state Init to ExStart, the test for whether the
  neighboring router is DR or BDR should be against the
  local router's notion of DR/BDR, not the neighbor's view.

17 years ago[ospfd] Implement new ospf router subcommand "log-adjacency-changes [detail]"
Andrew J. Schorr [Thu, 29 Jun 2006 20:20:52 +0000 (20:20 +0000)]
[ospfd] Implement new ospf router subcommand "log-adjacency-changes [detail]"

2006-06-28 Erik Muller <erikm@internap.com>

* ospfd.h: Define 2 new struct ospf config flags:
  OSPF_LOG_ADJACENCY_CHANGES and OSPF_LOG_ADJACENCY_DETAIL
* ospf_nsm.c (nsm_change_state): Log adjacency changes if
  requested.
* ospf_vty.c (ospf_log_adjacency_changes): New command function
  to implement ospf subcommand "log-adjacency-changes [detail]".
  (no_ospf_log_adjacency_changes) Turn off log-adjacency-changes.
  (show_ip_ospf) Show whether adjacency changes are logged.
  (ospf_config_write) Add "log-adjacency-changes [detail]" to config.
  (ospf_vty_init) Add ospf_log_adjacency_changes and
  no_ospf_log_adjacency_changes.
* ospfd.texi: Document new ospf router subcommand
  "log-adjacency-changes [detail]".