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.
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
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.
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.
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.
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.
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.
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.
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.
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.).
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.
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.
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
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.
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.
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.
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.
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.
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.
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..
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.
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.
Paul Jakma [Tue, 27 Jun 2006 07:52:03 +0000 (07:52 +0000)]
[lib] Centralise Zserv route type information, auto-generate redist strings
2006-05-23 Paul Jakma <paul.jakma@sun.com>
* route_types.txt: New file, table of ZEBRA_ROUTE definitions.
* route_types.awk: New script, to parse previous and generate
(for now) redistribute string defines.
* Makefile.am: build route_types.h using previous two, ala
memtypes.h, include the script and table file in EXTRA_DIST.
* command.h: pull in route_types.h, add a REDIST_STR define.
Paul Jakma [Mon, 26 Jun 2006 12:55:58 +0000 (12:55 +0000)]
[doc] OSPF MD5 keyid documentation, fix texinfo warnings in bgpd.texi
2006-06-26 Paul Jakma <paul.jakma@sun.com>
* ospfd.texi: Document that MD5 keyid is part of the protocol.
* bgpd.texi: shut texinfo warnings up by replacing brackets in
variable with angle brackets.
Paul Jakma [Mon, 26 Jun 2006 12:50:06 +0000 (12:50 +0000)]
[ospfd] NSSA translate-enabled ABR should declare itself as ASBR
2006-06-26 Paul Jakma <paul.jakma@sun.com>
* ospf_abr.c: (general) NSSA translate-candidate ABRs need to
be ASBRs, or other routers may rightfully refuse to install
translated type-5s LSAs. reported by dendroot@gmail.com.
(ospf_abr_nssa_check_status) Detect change in translator
state when ABR, and inc/dec redistribute count as when we
leave/enter the disabled state - so that translate-enabled
ABR properly sets ASBR bit on non-NSSA areas.
Run the resulting function through indent to clean it up.
* ospf_lsa.c: (router_lsa_flags) For purposes of ASBR bit,
NSSA area is same as stub area.
Andrew J. Schorr [Sun, 18 Jun 2006 00:45:48 +0000 (00:45 +0000)]
[ospfd] Fix ospf passive-interface subcommand to create interface if necessary
2006-06-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_vty.c: ({no_,}ospf_passive_interface) Replace if_lookup_by_name
with a call to if_get_by_name -- if the interface does not exist
already, it should be created. And remove the obsolete warning
message.
2006-06-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* redhat/quagga.spec.in: Get default distro automatically
by using rpm to query the fedora-release version.
And fix a typo (should be default_dist, not dist_default).
Paul Jakma [Thu, 15 Jun 2006 18:40:49 +0000 (18:40 +0000)]
[ospfd] Fix multicast membership drop bug
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* Reported by Milan Koci
* ospf_interface.h: (struct ospf_if_info) Add reference counts
for multicast group memberships. Add various macros to help
manipulate/check membership state.
* ospf_interface.c: (ospf_if_set_multicast) Maintain the
ospf_if_info reference counts, and only actually drop
memberships if it hits 0, to avoid losing membership when
OSPF is disabled on an interface with multiple active OSPF
interfaces.
* ospf_packet.c: (ospf_{hello,read}) Use the new macros to
check/set
multicast membership.
* ospf_vty.c: (show_ip_ospf_interface_sub) ditto.
Paul Jakma [Thu, 15 Jun 2006 18:10:47 +0000 (18:10 +0000)]
[zebra] Fix forgetfulness wrt configured address on FreeBSD
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* (general) The key fixes are actually Andrew Schorr's.
* interface.c: (ip_address_uninstall) Unset the configured flag.
* connected.c: (connected_same) new helper, check whether
two connected are same.
(connected_implicit_withdraw) new helper, consolidation of
existing code in connected_add_ipv{4,6}.
Try filter out unneeded Zserv address delete/adds when
address is exact same.
Where old address is implicitely removed, be sure to preserve
the IFC_CONFIGURED flag if set, fixes bug where configured
addresses were being lost on FreeBSD.
Paul Jakma [Sun, 28 May 2006 08:26:15 +0000 (08:26 +0000)]
[lib] Add support for Sun libc printstack to zlog_backtrace_sigsafe
2006-05-28 Paul Jakma <paul.jakma@sun.com>
* configure.ac:
Check for Sun libc printstack(), add a general HAVE_STACK_TRACE
define for lib/log.c, if any supported stack symbol dumping
function is found (glibc backtrace/sun libc printstack).
* log.c: (general) Add support for Sun libc printstack().
(hex_append) make the cpp conditional on general HAVE_STACK_TRACE
define.
(zlog_backtrace_sigsafe) Ditto. Add printstack() version of the
the DUMP macro in this function.
Paul Jakma [Sun, 28 May 2006 08:08:24 +0000 (08:08 +0000)]
[lib] include inttypes.h rather than stdint.h, provide defines where missing
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)
Paul Jakma [Sun, 28 May 2006 08:02:41 +0000 (08:02 +0000)]
[build] Update SOS CFLAGS and add check for GNU Make in configure.ac
2006-05-28 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Update SOS CFLAGS, Xt shouldn't be used and
enable debug options.
Add a check for GNU Make and warn the user if it does not appear
to be the make used.
Andrew J. Schorr [Sun, 21 May 2006 04:04:49 +0000 (04:04 +0000)]
[interface configuration] Try to avoid losing address info after shutdown.
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.
Andrew J. Schorr [Fri, 19 May 2006 13:53:23 +0000 (13:53 +0000)]
[interface configuration] Preserve flag indicating address was set by quagga.
2006-05-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* connected.c: (connected_add_ipv4,connected_add_ipv6) If the
new struct connected matches an already existing one
(that will consequently be removed by connected_withdraw),
then be sure to preserve the ZEBRA_IFC_CONFIGURED flag.
Paul Jakma [Mon, 15 May 2006 16:56:51 +0000 (16:56 +0000)]
[lib] Add string mapping table for Zserv commands
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.
* ospf6_asbr.c: fix bug of calculating AS-External routes
in other areas. Add debugging function for border-router
calculation.
* ospf6d.h: version 0.9.7p
* bgp_aspath.{c,h}: (aspath_print_vty) take a format string,
so as to reduce burden on callers, all in bgp_route.c
* bgp_route.c: (route_vty_out{,tmp}) Update to match
aspath_print_vty, simplifying checks needed to get spacing
right. CID #4,#5.
({damp,flap}_route_vty_out) Ditto, CID #9, #10
Paul Jakma [Fri, 12 May 2006 23:11:14 +0000 (23:11 +0000)]
[ospfd] CID #13, debug for NULL type7 LSA should not print out data from it
2006-05-12 Paul Jakma <paul.jakma@sun.com>
* ospf_lsa.c: (ospf_translated_nssa_refresh) Add non-assert
sanity check, in case DEBUG isn't defined. Debug message
when no type7 exists should print the ID from the type5, not
the type7, fixes CID #13.
Paul Jakma [Fri, 12 May 2006 23:07:27 +0000 (23:07 +0000)]
[ospfd] CID #15, remove redundant NULL check in ism_change_state
2006-05-12 Paul Jakma <paul.jakma@sun.com>
* ospf_ism.c: (ism_change_state) NULL check on oi->area is
useless, it's always valid. Only possibility where it
couldn't be is if there is a race between abr_task and
cleaning up oi's, in which case a NULL check here isn't going
to do anything. Fixes CID #15.
Paul Jakma [Fri, 12 May 2006 23:02:46 +0000 (23:02 +0000)]
[ospfd] CID #28, remove another ospf_lookup call - ospf_redistribute_withdraw
2006-05-12 Paul Jakma <paul.jakma@sun.com>
* ospf_asbr.c: (ospf_redistribute_withdraw) remove ospf_lookup
call by taking the struct ospf * as argument, which the
caller has, fixing CID #28.
* ospf_asbr.h: (ospf_redistribute_withdraw) update declaration
* ospf_zebra.c: (ospf_redistribute_unset) update call to
ospf_redistribute_withdraw to match.
* ospf_lsa.c: (ospf_lsa_action) Get rid of the ospf_lookup
call, which is not checked for NULL return, by stripping out
functionality which is never used, hence fixing Coverity CID
#29.
(struct lsa_action) remove unused member.
Paul Jakma [Fri, 12 May 2006 22:55:41 +0000 (22:55 +0000)]
[ospfd] Squash another ospf_lookup call
2006-05-11 Paul Jakma <paul.jakma@sun.com>
* ospf_lsa.c: (ospf_default_originate_timer) Let the thread
take (struct ospf *) as thread argument, rather than (struct
ospf *)->default_originate, thus avoiding having to call
ospf_lookup.
* ospf_zebra.c: (ospf_redistribute_default_set) change setup
of ospf_default_originate_timer thread to match.
* ospfd.c: (ospf_router_id_update) ditto.
Paul Jakma [Fri, 12 May 2006 22:51:49 +0000 (22:51 +0000)]
[ospfd] Fix leak in area-range-cost command, CID #46.
2006-05-11 Paul Jakma <paul.jakma@sun.com>
* ospf_abr.c: (ospf_area_range_cost_set) Shouldn't create a new
range, should just lookup to see if one exists, the new range
is just leaked. Fixes CID #46.
Paul Jakma [Mon, 8 May 2006 14:37:17 +0000 (14:37 +0000)]
[bgpd] Bug #240, Fix route-server crash when static routes are configured
2006-05-08 Paul Jakma <paul.jakma@sun.com>
* bgp_route.c: (bgp_afi_node_get) given table should never be
NULL, check/assert this.
(bgp_static_update) Bug #240. Rsclients should only be passed
the static update if they are configured for the afi,safi.
Paul Jakma [Thu, 4 May 2006 08:08:15 +0000 (08:08 +0000)]
[bgpd] Fix bug where FSM can stay hung forever in Idle/Clrng
2006-05-04 Paul Jakma <paul.jakma@sun.com>
* bgp_route.c: (general) Fix logical bug in clearing, noted
by Chris Caputo in [quagga-users 6728] - clearing depended on
at least one route being added to workqueue, in order for
workqueue completion function to restart FSM. However, if no
routes are cleared, then the completion function never is
called, it needs to be called manually if the workqueue
didn't get scheduled.
Finally, clearing is per-peer-session, not per AFI/SAFI, so
the FSM synchronisation should be in bgp_clear_route_table.
(bgp_clear_route_table) Wrong place for FSM/clearing
synchronisation, move to..
(bgp_clear_route) FSM/clearing synchronisation should be
here.
If no routes were cleared, no workqueue scheduled, call
the completion func to ensure FSM kicks off again.
Paul Jakma [Thu, 4 May 2006 07:52:12 +0000 (07:52 +0000)]
[bgpd] bug #210: Enable crucial VPNv4 code which was disabled
2006-05-04 Paul Jakma <paul.jakma@sun.com>
* (general) VPNv4 fixes. Certain VPNv4 code was not enabled.
See bug #210.
* bgp_attr.{c,h}: (bgp_packet_{withdraw,attribute}) Tag should be
u_char really.
* bgp_packet.c: (bgp_{update,withdraw}_packet) Enable some
VPNv4 code which inexplicably was ifdef'd out. comments from
a tester on IRC suggest this fixes bug #210.
Paul Jakma [Thu, 4 May 2006 07:37:37 +0000 (07:37 +0000)]
[docs] Update ripd docs on version and authentication, see bugs #261,#262
2006-05-04 Paul Jakma <paul.jakma@sun.com>
* ripd.texi: Add Version Control as a distinct section.
Expand Version Control section with overview text,
touching on insecurity of RIPv1 and referencing
authentication section, cleanup text of various version
commands.
RIP Authentication: Add overview text, refer to RIPv1 version
control, which is required to completely secure RIP.