vincent [Wed, 28 Sep 2005 15:47:44 +0000 (15:47 +0000)]
2005-09-28 Alain Ritoux <alain.ritoux@6wind.com>
* lib/md5-gnu.h: removed
* lib/md5.h: replaces md5-gnu.h
* lib/Makefile.am: use correct md5.h
* lib/md5.c: import from WIDE
* ospfd/ospf_packet.c: use new md5 API
* ripd/ripd.c: use new md5 API
* isis_spf.c: Changing cost from uint16_t to uint32_t. Unset
ISIS_ROUTE_FLAG_ACTIVE flag before running SPF.
* isisd.[ch]: Separate route tables for different levels. SPF is done
separately, but in case of L1L2 area they have to be merged.
* isis_zebra.c: Set/unset ISIS_ROUTE_FLAG_ZEBRA_SYNC flag correctly in
case of adding/removing IPv4 routes.
* zebra_route.c: Rework route validating process. Merging L1 and L2
tables in case of L1L2 area.
In short - many changes to make SPF work more correctly, add/remove
to/from RIB also works now. It's still very far from perfect though.
* isis_tlv.[ch]: New function tlv_add_in_addr() to put just one IPv4
address into TLV. Used for IPv4 address TLV (in case of LSP) and TE
router ID TLV.
* isis_lsp.c: Use tlv_add_in_addr() and include router ID in LSP.
* isis_tlv.[ch]: Two new functions - tlv_add_te_is_neighs() and
tlv_add_te_ipv4_reachs() to handle TLV's with new metric. None of
them handle sub TLVs though for now.
* dict.[ch]: Revert all nonfunctional changes. It's external module
imported from kazlib and it's better not to screw it - there is
theoretical chance that we might want to merge changes from upstream
at some point. Also avoid the loss of info about upstream version
(rcsid).
paul [Wed, 21 Sep 2005 12:30:08 +0000 (12:30 +0000)]
2005-09-21 Paul Jakma <paul.jakma@sun.com>
* zebra_rib.c: (static_uninstall_ipv{4,6}) Fix regression wrt
removal of static routes with multiple-hops introduced with
the workqueue conversion. We should free the relevant
nexthop and then get rib_process to run, otherwise we just
get same static route back again (with no way to unconfigure
it, because its already deleted from configuration).
2005-09-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_lsa.h: (ospf_external_lsa_flush) Comment out the 5th argument
(nexthop) since it is not used in the function (except inside
some commented-out code).
* ospf_lsa.c: (ospf_external_lsa_flush,ospf_external_lsa_refresh)
Comment out the 5th argument to ospf_external_lsa_flush.
* ospf_asbr.c: (ospf_redistribute_withdraw) Comment out 5th arg
to ospf_external_lsa_flush.
* ospf_vty.c: (no_ospf_default_information_originate) Eliminate 5th
uninitialized nexthop arg to ospf_external_lsa_flush.
* ospf_zebra.c: (ospf_zebra_read_ipv4) Comment out 5th arg
to ospf_external_lsa_flush.
* ospfd.c: (ospf_network_set) Comment out 5th arg
to ospf_external_lsa_flush.
* isis_lsp.h: Added backpointer to the area from LSP. For now it's used
only in generated topology LSPs.
* isisd.[ch]: Cleanup CLI commands related to topology generation and
added command to specify base fo dynamic hostname for topology LSPs.
* isis_lsp.c: Rewrite almost all code related to generation topology
LSPs (top_lsp_refresh(), generate_topology_lsps() and
build_topology_lsp_data() functions). Topology is connected to own
LSP now (lsp_build_nonpseudo). Commented out lsppdu_realloc
functions, it's not used any more hopefully.
Topology generation feature is actually useful now.
* isis_lsp.c (lsp_update): Remove LSP from database before updating
its data and put it back after. Database entry MUST contain at least
correct pointers to the sysid to get correct compare results.
* isis_lsp.[ch], isis_pdu.c: Pass level to the lsp_update() function.
paul [Mon, 12 Sep 2005 16:58:52 +0000 (16:58 +0000)]
2005-09-12 Paul Jakma <paul.jakma@sun.com>
* (general) RTM_CHANGE and implicit withdraw on RTM_NEWADDR
support.
* connected.c: (connected_withdraw) new function. withdraw a
connected subnet address set from zebra, and pass information
along to clients.
(connected_announce) similar, but to announce a new connected
subnet address set.
(connected_check_ipv4) renamed to connected_check, as its
AFI independent.
(connected_add_ipv{4,6}) Remove the connected address announce
stuff, use connected_announce instead.
If connected_check indicates address is already present,
treat it as an implicit withdraw of the existing address, ie
remove the old address details and replace with the new
details.
(connected_delete_ipv{4,6}) Use connected_withdraw.
(connected_check_ipv6) deleted in favour of connected_check.
* connected.h: Rename connected_check_ipv4 to connected_check.
delete connected_check_ipv6.
* interface.c: Use connected_check rather than the AFI specific
symbols.
* kernel_socket.c: (rtm_read) RTM_CHANGE support. Create a
rib delete event for the existing route, before adding route
again.
(kernel_read) we can handle RTM_CHANGE now.
paul [Sat, 10 Sep 2005 16:55:02 +0000 (16:55 +0000)]
2005-09-10 Paul Jakma <paul.jakma@sun.com>
* Makefile.am: bgpd shouldn't list libgp's sources as its own.
Use LDADD.
* bgp_aspath.h:
(struct assegment) New struct, abstract representation of a
list of AS_PATH segments and the contained ASNs.
(struct aspath) Remove the raw-data related
fields, reference the abstract struct assegment instead.
Remove several other computed fields, it's just a
headache to maintain them and they're cheap to compute from
struct assegment.
(aspath_parse) parse a stream, not a pointer to raw data.
(aspath_count_{hops,confeds,size}) helpers to access
information formerly directly contained in struct aspath.
(aspath_snmp_pathseg) Helper for SNMP, BGP MIB wants
to be able to output hex representation of raw data.
* bgp_aspath.c: (general) partial-rewrite. Store aspath data
as an abstract singly-linked list of abstract segments,
rather than storing the raw data, and parsing it each and
every time. Remove several count/size fields which are cheap
to compute from the abstract segment structure.
(global) Include stream.h, needed for aspath_parse, and
others. Couple of helper macros added.
(struct assegment_header) Just the header, and only the
header.
(assegment_data_{new,free}) convenience functions for
AS_SEG_DATA allocation, the dynamic, per-segment array of
ASNs.
(assegment_{new,free,free_all,dup,dup_all}) convenience
functions for creating struct assegments. The _all forms will
follow the entire chain of segments from the given segment.
(assegment_prepend_asns) new function, prepend an ASN N times
to segment.
(assegment_append_asns) Append a list (array) of ASNs to
segment.
(int_cmp) convenience function for the aspath hash.
(assegment_normalise) new function. Normalise the given
segment chain to meet expectations of Quagga, and to
eliminate differing raw representations of the same paths.
Merge 'runs' of SEQUENCEs into one segment as our internal
segment is not limited by the protocol AS_PATH segment
length. Sort ASNs in SETs.
(aspath_new) Take void argument to quell warnings. Use the
assegment convenience functions.
(assegment_count_{asns,confeds,hops}) new functions to
compute at runtime values previously held in struct aspath.
(aspath_size) ditto.
(aspath_make_str_count) rewritten to stringify new
representation, and to be slightly easier to understand
hopefully.
(aspath_str_update) convenience function, update the aspath
str. Should investigate removing maintained string from
struct aspath, just run-time compute it, as per other fields.
It's just a maintenance headache, would save noticeable
amount of RAM with possibly not much extra run-time cost.
(aspath_dup) use the assegment dup functions.
(aspath_hash_alloc) Take void * argument to satisfy gcc. Use
the proper helper functions to dup data.
(assegments_parse) new function. parse raw AS_PATH data into
struct assegments. Normalise and return the head of the list.
(aspath_parse) Parse a stream, not pointer to raw data and
use assegments_parse to do it.
(assegment_data_put) Write out a single segment data in protocol
form to stream.
(assegment_header_put) ditto but for segment header.
(aspath_put) new function. As per previous but for an entire
struct aspath.
(aspath_snmp_pathseg) wrapper around aspath_put for
bgp_snmp.c. Uses a static buffer sadly.
(aspath_aggregate_as_set_add) rewritten to use assegments.
(aspath_aggregate) ditto
(aspath_{firstas,loop,private_as}_check) ditto
(aspath_{merge,prepend,add_one_as}) ditto
(aspath_cmp_left{_confed}) ditto
(aspath_delete_confed_seq) ditto, plus fixed to properly
delete all leading confed segments.
(aspath_as_add) Just use assegment_append_asns.
(aspath_segment_add) updated to use assegments.
(enum as_token) Add values for confeds
(aspath_gettoken) Add support for confeds
(aspath_str2aspath) ditto
(aspath_key_make) updated to use as_segments. Also, add
segment type into the hash value as appropriate.
(aspath_cmp) updated to use as_segments.
(aspath_print) don't segfault on NULL argument.
* bgp_attr.c: (bgp_attr_aspath) aspath_parse wants the stream
now. No need for manual forwarding of stream.
(bgp_packet_attribute) empty aspath is now denoted by NULL
segment field, length is gone.
Use aspath_size() to determine size.
(bgp_attr_init) Fix declaration, explicitely specify void
arg.
(bgp_dump_routes_attr) Use aspath_size() to determine size.
* bgp_route.c: (bgp_info_cmp) use the aspath_count_* functions.
(bgp_rib_withdraw) remove unused variable. Use
aspath_count_hops.
* bgp_snmp.c: (bgp4PathAttrTable) raw data is gone, use
aspath_snmp_pathseg to get the representation.
paul [Thu, 8 Sep 2005 15:18:39 +0000 (15:18 +0000)]
* Thu Sep 12 2005 Paul Jakma <paul@dishone.st>
- Steal some changes from Fedora spec file:
- Add with_rtadv variable
- Test for groups/users with getent before group/user adding
- Readline need not be an explicit prerequisite
- install-info delete should be postun, not preun
paul [Mon, 5 Sep 2005 11:54:13 +0000 (11:54 +0000)]
2005-09-05 Paul Jakma <paul.jakma@sun.com>
* command.c: (install_element) be more robust. Eg, cmd_init
need not have been called, some applications may use other
library subsystems, which call install_element, without the
application wanting commands and hence not calling cmd_init.
* *.c: Try to be less verbose by default (without any debug options
on).
* isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of
touching endp directly.
* isis_lsp.c (lsp_build_pseudo): Ditto.
* random.c, spgrid.[ch]: Fix warnings with hope that I didn't broke
anything. These floats to longs and vice versa casts are starnge
indeed.
* isis_pdu.c: As we don't use %z for size_t for now because we support
older compilers, cast them to unsigned long.
Also fix previous changelog entry. Isisd compiles cleanly now again.
* isis_adjacency.c, isis_lsp.c, isisd.c: Replace XMALLOC && memset
with XCALLOC.
* isis_lsp.c (lsp_build_pseudo): Fix adding ES neighbour.
* isis_tlv.c: More compact free_tlvs() function.
* isis_lsp.c (lsp_build_nonpseudo) : Try to fix one more regression
introduced by stream cleanup. Seek enp to the right place before
starting to fill stream with TLVs.
hasso [Sat, 27 Aug 2005 06:05:47 +0000 (06:05 +0000)]
* zebra_rib.c, rib.h: Add distance and metric arguments to the
rib_add_ipv6() function so that IPv6 routes in RIB can have correct
metric. No IPv6 routing daemon uses distance yet though.
* zserv.c, connected.c, kernel_socket.c, rt_netlink.c,
rtread_proc.c,zserv.c: Pass metric and distance info to the
rib_add_ipv6().
hasso [Fri, 26 Aug 2005 12:58:38 +0000 (12:58 +0000)]
* bgp_route.c: Third (?) attempt to fix best selection breakage
introduced long time ago with route server patch. Hopefully
it's last case to fix - route-server client not in peer group.
paul [Thu, 25 Aug 2005 14:50:05 +0000 (14:50 +0000)]
2005-08-25 Paul Jakma <paul@jakma.org>
* configure.ac: Add -fno-omit-frame-pointer after -Os in default
cflags, just to be sure.
Fedora's readline library does not itself link to termcap, hence
we must pass the result of termcap tests in via OTHER-LIBRARIES
argument, otherwise the test of main in readline will fail due to
missing termcap systems. On systems like Debian, -ltermcap
is not needed for the readline test, because libreadline already
links to it.
paul [Mon, 22 Aug 2005 22:34:41 +0000 (22:34 +0000)]
2005-08-22 Paul Jakma <paul.jakma@sun.com>
* bgp_route.h: (struct bgp_info) add a new flag, BGP_INFO_REMOVED.
BGP_INFO_VALID is already overloaded, don't care to do same thing
to STALE or HISTORY.
* bgpd.h: (BGP_INFO_HOLDDOWN) Add INFO_REMOVED to the macro, as a
route which should generally be ignored.
* bgp_route.c: (bgp_info_delete) Just set the REMOVE flag, rather
than doing actual work, so that bgp_process (called directly,
or indirectly via the scanner) can catch withdrawn routes.
(bgp_info_reap) Actually remove the route, what bgp_info_delete
used to do, only for use by bgp_process.
(bgp_best_selection) reap any REMOVED routes, other than the old
selected route.
(bgp_process_rsclient) reap the old-selected route, if appropriate
(bgp_process_main) ditto
(bgp_rib_withdraw, bgp_rib_remove) make them more consistent with
each other. Don't play games with the VALID flag, bgp_process
is async now, so it didn't make a difference anyway.
Remove the 'force' argument from bgp_rib_withdraw, withdraw+force
is equivalent to bgp_rib_remove. Update all its callers.
(bgp_update_rsclient) bgp_rib_withdraw and force set is same as
bgp_rib_remove.
(route_vty_short_status_out) new helper to print the leading
route-status string used in many command outputs. Consolidate.
(route_vty_out, route_vty_out_tag, damp_route_vty_out,
flap_route_vty_out) use route_vty_short_status_out rather than
duplicate.
(route_vty_out_detail) print state of REMOVED flag.
(BGP_SHOW_SCODE_HEADER) update for Removed flag.
paul [Tue, 16 Aug 2005 17:23:15 +0000 (17:23 +0000)]
2005-08-16 Paul Jakma <paul.jakma@sun.com>
* README.txt: point to the opensolaris.org sources for the SMF
manifest class scripts. Make step 3 slightly more explicit about
what 'this directory' is.
paul [Tue, 16 Aug 2005 15:22:14 +0000 (15:22 +0000)]
2005-08-16 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (general) Fix previous commit, broke multicast bind and
hence setting of source port, which broke communication with
non-borken ripd. Fix removes more stuff from rip_interface.c
than it adds to ripd.c ;)
(rip_create_socket) the to argument really is a from argument,
rename it. Set the source port to RIP port unconditionally, it's
required.
(rip_send_packet) Set from address correctly for multicast.
(rip_output_process) trivial: num can be BSS specified, rather
than in body.
* rip_interface.c: (rip_interface_multicast_set) strip out
redundant stuff related to bind, which rip_create_socket does.
Just make it set the multicast socket option, as per the
interface concerned, no more.
paul [Wed, 10 Aug 2005 15:46:11 +0000 (15:46 +0000)]
2005-08-09 Paul Jakma <paul.jakma@sun.com>
* ospf6_asbr.c: (ospf6_asbr_redistribute_add) Fix sense of testing
of route_map_apply return code, it can return many things other
than RMAP_MATCH which do not indicate DENY. Should test explicitly
for equality to RMAP_DENYMATCH instead.
gdt [Wed, 10 Aug 2005 15:11:21 +0000 (15:11 +0000)]
add INSTALL.quagga.txt to the distribution, so that people who apply
patches and lose because of old autoconf/automake versions have the
opportunity to find tout what to do.
gdt [Wed, 10 Aug 2005 13:20:03 +0000 (13:20 +0000)]
2005-08-10 Greg Troxel <gdt@fnord.ir.bbn.com>
* getopt.h: Don't declare getopt (rather than getopt_long), since
quagga doesn't need it.
* getopt.c (getopt): Don't define getopt.
Fixes build breakage on NetBSD, and seems likely to work on most
platforms since it avoids the entire issue of system getopt
declarations and whether they conform to POSIX.2. Note that this
change doesn't address system getopt_long declarations, but also
doesn't change anything about getopt_long.
hasso [Fri, 5 Aug 2005 07:40:15 +0000 (07:40 +0000)]
* ospf_zebra.c: Don't assert/stop before type == ZEBRA_ROUTE_MAX if
dealing with routemaps. There is ospf->route_map[ZEBRA_ROUTE_MAX]
for default-information.
paul [Fri, 29 Jul 2005 14:36:00 +0000 (14:36 +0000)]
2005-07-29 Paul Jakma <paul.jakma@sun.com>
* interface.c: (if_delete_update) should always be available, not
just on RTM_IFANNOUNCE/NETLINK systems.
* kernel_socket.c: (ifan_read) only call if_delete_update when
interface departs, dont if_delete, because we wish to retain
interface configuration state even when interfaces are removed.
(ifm_read) If we dont have RTM_IFANNOUNCE, then transitioning
to down state is only chance we have to clean up interface in case
it is deleted (eg Solaris down -> unplumb -> plumb up).
* redistribute.c: (zebra_interface_delete_update) should always be
available, we /will/ call it now on all systems, via
if_delete_update.
* zserv.c: (zsend_interface_delete) ditto
(zsend_interface_address) Update the call-flow diagramme, to
reflect that if_delete_update /is/ now called on all systems,
potentially.
* zserv.h: (zsend_interface_delete) unconditionally exported, as
above.
2005-07-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* prefix.c: (prefix_ipv4_new, prefix_ipv6_new): Call prefix_new
to allocate the memory to make sure that all struct prefix pointers
point to objects of the same length (avoids memory overruns
on struct prefix assignments).
(prefix_ipv4_free, prefix_ipv6_free): Simply call prefix_free.
It is interesting to note that these functions are never actually
called anywhere in the code. Instead prefix_free was already
being called directly, despite the previous MTYPE incompatibility.
paul [Tue, 12 Jul 2005 20:04:22 +0000 (20:04 +0000)]
2005-07-12 Paul Jakma <paul.jakma@sun.com>
* ospfd.h: add OSPF_ABR_DEFAULT for convenience, make
OSPF_ABR_CISCO be the default ABR type.
* ospfd.c: (ospf_new) initialise abr_type to OSPF_ABR_DEFAULT
* ospf_vty.c: (no_ospf_abr_type_cmd) add standard as a negatable
abr_type. default abr_type should be OSPF_ABR_DEFAULT.
(ospf_config_write) test whether default abr_type against
OSPF_ABR_DEFAULT, rather than any specific ABR_TYPE.
paul [Tue, 28 Jun 2005 17:17:12 +0000 (17:17 +0000)]
2005-06-28 Paul Jakma <paul.jakma@sun.com>
* (global) Extern and static'ification, with related fixups
of declarations, ensuring files include their own headers, etc.
if_ioctl.c: (interface_info_ioctl) fix obvious arg mis-order in
list loop
paul [Tue, 28 Jun 2005 12:44:16 +0000 (12:44 +0000)]
2005-06-28 Paul Jakma <paul.jakma@sun.com>
* (global) The great bgpd extern and static'ification.
* bgp_routemap.c: remove unused ROUTE_MATCH_ASPATH_OLD code
(route_set_metric_compile) fix u_int32_t to ULONG_MAX comparison
warnings.
* bgp_route.h: (bgp_process, bgp_withdraw, bgp_update) export these
used by various files which had their own private declarations,
in the case of mplsvpn - incorrect.
paul [Tue, 28 Jun 2005 00:19:48 +0000 (00:19 +0000)]
2005-06-28 Paul Jakma <paul.jakma@sun.com>
* INSTALL.quagga.txt: GNU make is required now, because of manual
automatic rules in solaris/Makefile.am. (If someone knows how
to do these in a better way..).
GNU AWK is required for CVS checkout builds.
hasso [Fri, 24 Jun 2005 08:17:51 +0000 (08:17 +0000)]
* ospf6_message.c: Changed to be insensitive to changes of neighbors'
IP source address in the OSPF packets. It was sometimes problematic
in actual operation (needed some operational cost: restarting
all-neighbor routers when I/F NIC was changed). Due to this change,
a previously safe case, attaching multiple interface to the same
link will now be dengerous and will not work. Remedy to that should
be applied later.
hasso [Fri, 24 Jun 2005 07:50:12 +0000 (07:50 +0000)]
* ospf6_interface.c: fix the way inactivity_timer is called. Because
inactivity_timer() deletes the neighbor from the neighbor_list, it
cannot be called by thread_execute() from inner side of the
neighbor_list for-loop.
(Although crash was already fixed in Quagga, it's better follow the
GNU Zebra logic).
paul [Wed, 15 Jun 2005 19:15:35 +0000 (19:15 +0000)]
2005-06-15 Paul Jakma <paul.jakma@sun.com>
* bgpd.c: (bgp_terminate) workqueue's are lazy allocated and its
possible to terminate bgpd before workqueues were setup, causing
an abort/crash. Reported by Ashish Mehta of Sun.
paul [Wed, 15 Jun 2005 11:00:11 +0000 (11:00 +0000)]
2005-06-15 Paul Jakma <paul.jakma@sun.com>
* quagga.xml.in: Pass the FMRI to the method, removing need for
daemon_name property and deducing the FMRI.
remove the empty config_file and pid_file definitions, they just
make things difficult in the method script, cause it then has to
deal with svcprop returning "" for defined empty properties.
Remove daemon_name everywhere.
* quagga.init.in: Take the FMRI as an argument
Remove deducing the FMRI from the defunct daemon_name property.
Use svcprop -q to test for presence of a property first.
Default vty_port to 0 and vty_addr to 127.1 if equivalent
SMF properties are not set.
Deduce the pid_file, we can infer it from @quagga_statedir@ I
think, it's probably not useful to allow it to be configurable
as a property anyway.
/var/run/ is on tmpfs on Solaris, so we probably will need
to create @quagga_statedir@ first run after boot.
Use @sbindir@, not /usr/local/sbin.
paul [Tue, 14 Jun 2005 14:07:07 +0000 (14:07 +0000)]
2005-06-14 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.c: consolidate the IFAM{ADDR,MASK}GET and
RTM{ADDR,MASK}GET macros into generic rta_addrs macros,
RTA_{ADDR,ATTR}_GET.
(af_check) could use 'inline' attribute
(ifam_read_mesg) remove IFAM{ADDR,MASK}GET macro, change to
generic macro.
(rtm_read_mesg) similar
paul [Mon, 13 Jun 2005 13:57:16 +0000 (13:57 +0000)]
2005-06-13 Paul Jakma <paul.jakma@sun.com>
* ospf_spf.c: Try get more information on a SEGV under
ospf_spf_vertex_add_parent.
(ospf_vertex_free) NULL out the child and nexthop lists
(ospf_vertex_add_parent) nexthop and child can not be NULL
vertex_nexthop's parent->child list can not be NULL
(ospf_spf_next) w and cw are per-loop iteration variables, move
declarations into loop body.
paul [Fri, 3 Jun 2005 18:01:50 +0000 (18:01 +0000)]
2005-06-03 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (rip_create_socket) Make it static.
Remove the getservbyname stuff, as RFC2453 3.9.2 says non-RIP
port messages should be discarded, quagga doesnt accept them,
no need to lookup port.
Take a 'to' argument, if socket should be bound to something else.
setsockopt_so_recvbuf might need privs, move it to the raised
privileges section.
dont forget to close the socket if bind fails.
(rip_send_packet) use strncpy, just in case (address is under
our control anyway, but still).
dont duplicate rip_create_socket - just use it.
(rip_create) rip_create_socket takes an argument now, modify.
paul [Thu, 2 Jun 2005 16:33:53 +0000 (16:33 +0000)]
2005-06-02 Paul Jakma <paul.jakma@sun.com>
* quagga.xml.in: Fix mistake in bgpd definition. Change dependency
on zebra to optional. Remove the duplicated stability statements.
* quagga.init.in: svcprop should check PACKAGE_TARNAME, not _NAME.
no need to check for config file either, there's already a
dependency in the manifest.
paul [Thu, 2 Jun 2005 08:20:53 +0000 (08:20 +0000)]
2005-06-01 Paul Jakma <paul.jakma@sun.com>
* rip_interface.c: Fix authentication, no-auth impossible to specify
(rip_interface_new) default to RIP_NO_AUTH
(rip_interface_reset) ditto
(rip_interface_config_write) write out config for simple
paul [Wed, 1 Jun 2005 11:17:05 +0000 (11:17 +0000)]
2005-06-01 Paul Jakma <paul.jakma@sun.com>
* bgpd/(general) refcount struct peer and bgp_info, hence allowing us
add work_queues for bgp_process.
* bgpd/bgp_route.h: (struct bgp_info) Add 'lock' field for refcount.
Add bgp_info_{lock,unlock} helper functions.
Add bgp_info_{add,delete} helpers, to remove need for
users managing locking/freeing of bgp_info and bgp_node's.
* bgpd/bgp_table.h: (struct bgp_node) Add a flags field, and
BGP_NODE_PROCESS_SCHEDULED to merge redundant processing of
nodes.
* bgpd/bgp_fsm.h: Make the ON/OFF/ADD/REMOVE macros lock and unlock
peer reference as appropriate.
* bgpd/bgp_damp.c: Remove its internal prototypes for
bgp_info_delete/free. Just use bgp_info_delete.
* bgpd/bgpd.h: (struct bgp_master) Add work_queue pointers.
(struct peer) Add reference count 'lock'
(peer_lock,peer_unlock) New helpers to take/release reference
on struct peer.
* bgpd/bgp_advertise.c: (general) Add peer and bgp_info refcounting
and balance how references are taken and released.
(bgp_advertise_free) release bgp_info reference, if appropriate
(bgp_adj_out_free) unlock peer
(bgp_advertise_clean) leave the adv references alone, or else
call bgp_advertise_free cant unlock them.
(bgp_adj_out_set) lock the peer on new adj's, leave the reference
alone otherwise. lock the new bgp_info reference.
(bgp_adj_in_set) lock the peer reference
(bgp_adj_in_remove) and unlock it here
(bgp_sync_delete) make hash_free on peer conditional, just in
case.
* bgpd/bgp_fsm.c: (general) document that the timers depend on
bgp_event to release a peer reference.
(bgp_fsm_change_status) moved up the file, unchanged.
(bgp_stop) Decrement peer lock as many times as cancel_event
canceled - shouldnt be needed but just in case.
stream_fifo_clean of obuf made conditional, just in case.
(bgp_event) always unlock the peer, regardless of return value
of bgp_fsm_change_status.
* bgpd/bgp_packet.c: (general) change several bgp_stop's to BGP_EVENT's.
(bgp_read) Add a mysterious extra peer_unlock for ACCEPT_PEERs
along with a comment on it.
* bgpd/bgp_route.c: (general) Add refcounting of bgp_info, cleanup
some of the resource management around bgp_info. Refcount peer.
Add workqueues for bgp_process and clear_table.
(bgp_info_new) make static
(bgp_info_free) Ditto, and unlock the peer reference.
(bgp_info_lock,bgp_info_unlock) new exported functions
(bgp_info_add) Add a bgp_info to a bgp_node in correct fashion,
taking care of reference counts.
(bgp_info_delete) do the opposite of bgp_info_add.
(bgp_process_rsclient) Converted into a work_queue work function.
(bgp_process_main) ditto.
(bgp_processq_del) process work queue item deconstructor
(bgp_process_queue_init) process work queue init
(bgp_process) call init function if required, set up queue item
and add to queue, rather than calling process functions directly.
(bgp_rib_remove) let bgp_info_delete manage bgp_info refcounts
(bgp_rib_withdraw) ditto
(bgp_update_rsclient) let bgp_info_add manage refcounts
(bgp_update_main) ditto
(bgp_clear_route_node) clear_node_queue work function, does
per-node aspects of what bgp_clear_route_table did previously
(bgp_clear_node_queue_del) clear_node_queue item delete function
(bgp_clear_node_complete) clear_node_queue completion function,
it unplugs the process queues, which have to be blocked while
clear_node_queue is being processed to prevent a race.
(bgp_clear_node_queue_init) init function for clear_node_queue
work queues
(bgp_clear_route_table) Sets up items onto a workqueue now, rather
than clearing each node directly. Plugs both process queues to
avoid potential race.
(bgp_static_withdraw_rsclient) let bgp_info_{add,delete} manage
bgp_info refcounts.
(bgp_static_update_rsclient) ditto
(bgp_static_update_main) ditto
(bgp_static_update_vpnv4) ditto, remove unneeded cast.
(bgp_static_withdraw) see bgp_static_withdraw_rsclient
(bgp_static_withdraw_vpnv4) ditto
(bgp_aggregate_{route,add,delete}) ditto
(bgp_redistribute_{add,delete,withdraw}) ditto
* bgpd/bgp_vty.c: (peer_rsclient_set_vty) lock rsclient list peer
reference
(peer_rsclient_unset_vty) ditto, but unlock same reference
* bgpd/bgpd.c: (peer_free) handle frees of info to be kept for lifetime
of struct peer.
(peer_lock,peer_unlock) peer refcount helpers
(peer_new) add initial refcounts
(peer_create,peer_create_accept) lock peer as appropriate
(peer_delete) unlock as appropriate, move out some free's to
peer_free.
(peer_group_bind,peer_group_unbind) peer refcounting as
appropriate.
(bgp_create) check CALLOC return value.
(bgp_terminate) free workqueues too.
* lib/memtypes.c: Add MTYPE_BGP_PROCESS_QUEUE and
MTYPE_BGP_CLEAR_NODE_QUEUE
hasso [Tue, 31 May 2005 10:24:28 +0000 (10:24 +0000)]
* ospf6d.c: No need for double ';'. Fixes parsing "show ipv6 ospf6
database ..." commands for vtysh by extract.pl. Remove duplicate
install_element calls.
paul [Tue, 31 May 2005 08:38:50 +0000 (08:38 +0000)]
2005-05-31 Paul Jakma <paul.jakma@sun.com>
* zserv.c: (zsend_route_multipath) Fix bug if route is sent
with no NEXTHOP_FLAG_FIB nexthops. As ZAPI_MESSAGE_IFINDEX
and ZAPI_MESSAGE_NEXTHOP are always set, clients would try
read non-existent nexthop information and hit stream assert.
Zserv is still broken for multi-nexthop messages, but it always was.
paul [Sun, 29 May 2005 11:27:24 +0000 (11:27 +0000)]
2005-05-29 Paul Jakma <paul@dishone.st>
* ripd.c: (rip_output_process) fix error which crept in my
previous rip auth untanglement commit - it had become impossible
to not have authentication (even for v1).