#
# /vol/src/devel/gated/master/gated/CHANGES,v 1.27.2.9 1995/06/06 15:17:02 jch Exp
#
# Gated Release 3.5
# Copyright (c) 1990,1991,1992,1993,1994,1995 by Cornell University.  All
# rights reserved.  Refer to Particulars and other Copyright notices at
# the end of this file. 
# 
#

		Changes for the R3_5Alpha_11 distribution

General:
	Fix an ASPATH compilation error when OSPF is not defined.

	Fix an IGMP compilation error when router discovery is not
	defined.

	Fix an AIX warning message generated when reading netopts.

	Clean up nlist() support code to only try to look up variables
	that should be present.  AIX's knlist() function is more picky
	about this than documented.  Remove nlist dependencies from all
	but the code that reads it.

	When NEED_STRERROR is defined, include the definition of
	strerror() to avoid warnings about incompatible types.  This
	doesn't fix systems like SunOS 4.1.1 where strerror() is in libc
	but not defined in any header files.

	Make all kernel symbols read by the nlist code settable in the
	obj*/Config file.  Also allow some of them to be set to an empty
	string if they are not available.

	Clean up code that limits the number of commands per
	configuration time sed script.

	The script to build canned dependencies did not associate
	asmatch.h with PROTO_ASPATHS.

	Lexer.l included <ctype.h> directly instead of defining
	INCLUDE_CTYPE to signal "include.h" to do it.  This caused
	compilation problems due to order of includes.

	Fixed memory leak in code that reads physical addresses of
	interfaces under SunOS 5.

	When an interface ``times out'' or becomes available again,
	route flags were being didled directly which would cause some
	protocols to miss the changes.

	By changing kernel remnants to low priority routes (for the
	purpose of scheduling kernel updates) some interface routes
	would have their RTS_GATEWAY flag set, causing incorrect
	routing. 

RIP & HELLO

	RIP would call rt_change() every time a route was refreshed
	because two sockaddrs were being compared by pointer instead of
	by content.

	Do not enforce holddowns from protocols that could not possibly
	cause a loop (i.e. a static route).

	Interface policy was being reset when it shouldn't which could
	result in RIP being sent on interfaces it was configured not to
	and other oddness.

OSPF

	OSPF was changing flags on a route before calling rt_change().
	This prevents the information about route changes from being
	propagated to certain protocols.

	OSPF would abort() when a stub host that did not exist was
	mentioned in the configuration file and that host address was
	taken from an attached subnet.

	Prevent the SPF from running in the case that a re-origination
	of the router links is scheduled.


		Changes for the R3_5Alpha_10 distribution

General:

	Fixed parse errors on some flavors of AS path matching with
	ranges.

	Renamed field names of gated sockaddr_un type so as not to
	conflict with macroized names of system struct sockaddr types.

	The assumption that the internal utime_t is the same as a struct
	timeval was not always correct on 64 bit systems.

	Later versions of BSD 4.4 Lite networking sometimes report the
	physical and protocol address.

	Call to recvfrom() passed a size_t * instead of an int * for
	returned source address length.  On some 64bit machines a size_t
	is 64 bits, resulting in null source addresses.

	Add macros to properly type cast assignments of scalars into and
	out of void *.

	Removed some unused variables pointed out by a new compiler.

	Allowed TSI dump entries to use multiple lines in the dump file.
	
	Change the IRIX 5.2 configuration to specify POSIX_SIGNALS as
	ANSI_SIGNALS is not a valid option.

	Add NO_IP_MULTICAST defines for systems that lie about
	supporting IP multicast.

	For compatibility reasons, allow the specification of
	``announce'' and ``listen'' in ``export'' and ``import''
	clauses, but issue warnings that their use is deprecated.

	An empty error message was reported when a symbolic name was
	encountered when ``noresolv'' was specified.

	If an aggregate route was changed to a generate route and/or
	vice versa (and switched between various flavours of generate
	routes), the kernel was get out of sync.

	Some kernel routes were being installed with a bogus value in
	metric2.

	Some protocols where not cleaning up the protocol-specific
	fields in the inteface address structure when they were
	terminated by reconfiguration.

	Multiple IP addresses per physical interace were not being
	handled properly in SunOS 5.

	Interface scan is now done as a foreground job, scheduled by a
	timer and when indications suggest interface status has changed.
	New indication is receiving ENETDOWN (and EHOSTDOWN) when
	sending packets.

BGP:

	BGP was allocating an incorrect transmit buffer size when using
	BGP 4 peers.

	Fixed a gcc warning on some systems.

	The AS path length field was not being properly maintained when
	combining two AS paths. 

	Add support for holdtime negotiation from the latest spec.

	An AS path with consecutive sequences was not handled properly.

OSPF:

	Was not sending zero netmask in HELLO packets to virtual
	neighbors.  OSPF implementations should ignore this mask, but
	not all were doing so.

	Reduce the number of neighbors listed in HELLO packets where
	appropriate.  The biggest offender is a large NBMA network.  In
	this case we try to strike a balance between buffer utilization
	and processing overhead.

	A bug in the code that transisions a neighbor down would result
	in incorrect counts of which neighbors were in what state.

	Fix bugs in ospf_monitor's history mechanism.

	A fix from Acee Lindem for a problem where OSPF gets an
	assertion failure in ospf_find_nh in certain cases where one
	router thinks one of a set of parallel links has gone down.

	Another fix from Acee Lindem for areas with costs greater than
	64k.

	When ospf_monitor displays virtual interfaces, it should display
	the local address of P2P interfaces.  Actually it should
	probably display both, but there is not enough room on the line.

RIP & HELLO:

	When exporting a non-holddown route (OSPF, EGP, BGP) into a
	holddown protocol (RIP, HELLO), a route flap could cause an old
	route to be stuck in holddown.

	When exporting routes into RIP and HELLO, don't apply holddowns
	if the route being overridden or doing the overridding is
	static, kernel static, interface or aggregate.

	An invalid network class (D or reserved) would cause a core
	dump.

	Change the default to not run RIP & HELLO on P2P interfaces. 
	This may be overridden with the ripin, ripout flags.

	RIP was ignoring default in version 2 packets.

	Add -N option to ripquery to query a specific destination.  Fix
	bugs in responses to destination specific queries.

	Reception of a RIP Request packet at a certain point during
	initialization could cause a core dump.

	The sourcegateways list would be ignored on interfaces on which
	noripout was specified.

		Changes for the R3_5Alpha_9 distribution

General:

	The AS path pattern matching code incorrectly parsed the origin
	so it would only ever match routes with an IGP origin.

	The Configuration files for Sun systems did not have the
	entries for non-standard kernel symbol names for UDP checksums
	and IP forwarding.

	Portability issues from reading the interface MTU on different
	systems.

	The pre-built dependency list did not have defines around the
	router discovery (rdisc.[ch]) files.

	Removed SIOCADDMULTI and SIOCDELMULTI, they are only used for IP
	multicast debugging.

	Changes (actually a little hack at this point) to work with the
	latest (post 4.4) kernel radix tree fixes from Keith Sklower.

BGP:

	A rare sequence of events would stumble into some code in
	support of `type routing' and the wrong route pointer would be
	used.  Not rare enough as it was able to bring the whole ANSnet
	backbone down.

RDISC:
	
	Some configuration variables were being printed incorrectly in a
	status dump.

	Be sure to set the multicast TTL to one.  This should not matter
	because these groups are local-wire only, but it shouldn't hurt.

	Only call setsockopt() to change unicast TTL when necessary.

	An incorrect metric check could result in an invalid default
	gateway being used.

RIP:

	Receipt of a RIP POLLENTRY command would cause a core dump.

	Was not freeing pointer to last interface address that was the
	target of a multicast.

HELLO:

	Hello was incorrectly obtaining a socket so it would not
	function at all.

OSPF:
	
	Summaries would not alway get propagated right when a
	non-backbone SPF is run before a backbone SPF just as a new
	summary was received.

		Changes for the R3_5Alpha_8 distribution

General:
	Fixed a memory leak when using aggregates.	

	On systems not supporting the routing socket, redirects were
	only processed once.

	Work around kernel bugs in SIOCGIFCONF.
	
	Failure to reset some internal parser variables resulted in
	unexpected results for a gated developer.

	Revamped the way holddowns of routes worked when dealing with
	holddown protocols (RIP & HELLO).  Routes would ``stuck''
	because of bugs in holddown processing.  Also, the potential
	existed for inconsistent routing because of improper handling of
	change lists.

	A single element range specification in AS path pattern matching
	did not work.

	The ability to use the documented ``proto any aspath ...'' as
	the source of an export statement was missing.

	When tracing was specified only at a protocol level and not at a
	global level, attempts to toggle tracing would result in a core
	dump.

	Enabling tracing for one protocol w/o enabling global tracing
	would result in a core dump when toggling tracing.

	The generic tunneling interface provided with MST PPP (amoung
	others) changes interface names, we were not allowing for this.

	Certain conditions could cause a core dump when the address on a
	physical address on an interface changes.

	The kernel route scan routine could reject some interface
	because of bugs in a routine that verifies contiguous masks.

	Fix for reading kernel interface list on SunOS 5.

BGP:
	If a pending connection failed before a call to getsockname(),
	gated would core dump instead of just closing the socket().

	Gated would core dump when receiving a null AS path plus other
	attributes.

	On systems BSD 4.3 systems (i.e. the routing table is
	hash-based) with Netatalk installed, Gated would choke on the
	Appletalk routes.

OSPF:
	Fix some byte order problems, mainly dealing with SNMP.

	Ospf_monitor used gets() which is not safe.

	A core dump on P2P interfaces would occur when a neighbor had
	transitioned to down and then received a hello.

	A core dump could occur when doing a status dump if a neighbor
	has a retransmission list.  This was caused by an earlier fix
	that was improperly applied.

	ASEs to routes on an attached network would be given incorrect
	next hops.

	Fix problems with handling of OSPF monitor 'a' requests, mostly
	byte-ordering problems.

SNMP:
	Fix some naming conflicts.

	Turning a protocol off would not result in it's mib tree being
	unregistered.

RIP & HELLO:
	When a route was overridden by a more attractive route, internal
	pointers and counters would be mishandled.

	Responses to ripquery could have the metric in the wrong byte
	order. 

		Changes for the R3_5Alpha_7 distribution

General:

	Fixes to linux port.

	Fixes to code to handle out of order AF_LINK addresses in the
	interface list.

	Added Config file for FreeBSD 1.1.5.1.

	SNMP would fail because of a botched macro with non __STCD__
	compilers. 

	The documented value of -1 as the kernel flash limit did not
	work.

	A bug in the handling of page sized blocks could result in
	strange core dumps.

	Fixed bugs in reading the kernel forwarding table on OSF/1
	system.

ICMP:

	Reception of an ICMP redirect on SunOS 4 resulted in a core
	dump.

RDISC:

	Surpress some compilation warnings on non-IP multicast capabable
	systems.

OSPF:

	Multipathing did not work for Summary and ASE routes.

	Fix core dump when receiving a HELLO from an NBMA neighbor.

	Display routes to area border, AS border and summary area border
	routers in gated_dump.

	Only the first net range in a list would be processed.

	Using ospf_monitor to try to query the retransmit queue for a
	neighbor would result in a core dump if the neighbor has a
	retransmit queue.


		Changes for the R3_5Alpha_6 distribution

General:

	On systems with routing socket support that also provide
	interface status notification, an reference to a non-existing
	address would cause a core dump during interface deletion.

	Aggregates aspaths were not properly maintained in all cases.

	Some systems that support AF_LINK (to report physical addresses)
	do not put them first.  Add code to allow for this and to add
	logging if ``iflist'' is enabled.

	All protocols (except HELLO) now read their default
	port/protocol number from /etc/protocols or /etc/services at
	startup.

	Assertion failures now print the test that failed as well as the
	file and line numbers.  This helps dealing with older versions
	where the line numbers may have changed.

	Page-sized blocks are now maintained on a dedicated list instead
	of being handled by the task_block*() routines.  This simplifies
	startup and makes it easier to use a debugging malloc().  Added
	optional debugging to the task_block*() routines.

	Fix some bugs in util/install emulation of BSD install.

	Change default memory alignment from sizeof(u_long) to
	MAX(sizeof (off_t), sizeof (off_t *)).  Some systems (NetBSD
	on the SPARC for one) that have an eight byte off_t require
	eight byte alignment.

	Delete routes read from the kernel that have non-contiguous
	masks.

	Add MD5 authentication support code.

	Do a beter job of deleting routes in the kernel with
	non-contiguous masks.

	Core dump when a physical interface that had no link-level
	address went away.

	On systems supporting sysctl() and SunOS 5.0 gated was
	improperly checking to see if IP forwarding was enabled.

	Fix bugs in handling of ICMP redirects.

BGP:
	
	Fix core dump during reconfiguration when BGP/OSPF interaction
	is active.

	Routes with AS paths that could be represented in OSPF tags were
	instead *always* being sent via IBGP.

	Was forgetting to reset next hop pointer when an IBGP route's
	next hop changed.  Many possible symptoms.

	Fixed potential core dump with internal BGP peers.

OSPF:

	Fix for incorrect handling of the sequence number of an old
	self-generated Net LSA.

	Add `h' command to ospf_monitor to display next hop list.

	When receiving a less recent LSA, send the more recent one back
	to the router which send us the older one.

	Area summary fixes from Acee Lindem @ IBM, including support for
	areas that are not advertised.

	On multi-access interfaces, neighbors are kept on a radix tree
	for fast lookup.

	SPF is now only run at most once every five seconds, as a
	background job.

	Fix assertion failure when advertising non-127.0.0.1 addresses
	on loopback interfaces (router-id addressing).

	Fixes for areas with a cost of greater than 64k (also from Acee
	Lindem @ IBM).

	Updated MIB support to latest draft.

	Fixed memory leaks and assertion failures related to next-hop
	blocks.  Converted some of OSPF's use of calloc()/free() to use
	gate'd task_block_*() routines for efficiency.  Reduce OSPF
	memory usage and reclaim more of it at reconfiguration/shutdown.

	Configuration option to allow unicasting of OSPF packets to P2P
	peers even if multicast is available.

	Added 'V' option to ospf_monitor to display gated version
	information.

	Finished converting OSPF's memory usage from calloc()/free() to
	task_block*().

	Slight changes to the queuing of entries in the link-state
	database.

	Added support for MD5 authentication.

	Fixed byte-order problems with stub costs.

	Import clause would be ignored without export clause without
	warning.  Print a warning message and update documentation.

	Some fixes to DD sequence number validation.

	Received OSPF monitor packets were not being counted.

RIP:

	First attempt at MD5 authentication for RIP, not yet
	standardized.

		Changes for the R3_5Alpha_5 distribution

General:

	Routes with offnet next hops (usually installed by BGP) would
	cause a core dump when doing a status dump.

	On SunOS 5, a message was being printed every time each
	interface list was scanned for link level address changes. 
	Changed this to only occur if `state' tracing is enabled.

	Try to reduce warning messages when trying to get physical
	interface addresses on SunOS.

	Restructured a few defines for more portability.

        Added the ability to select aggregate contributors based on AS, 
        AS path and TAG.

        On systems that use krt_rtread_radix.c (OSF/1, Unicos), the
        netmask of a route read from the kernel was not converted to an
        internal netmask causing an assertion failure.

        Simplex used be functionally equivalent to passive.  Now it
        means that packets from ourselves should not be counted towards
        keeping an interface from timing out.

	Code to resolve symbolic network names did not work on little
	endian systems.

	While reading remnant routes from the kernel, deletes would be
	processed immediately.  This is not a problem for systems with
	the getkerninfo()/sysctl() interface and probably not bad on
	systems where the hash table is read from /dev/kmem.  But it
	causes gated to loose track when reading the radix tree via
	/dev/kmem on those broken systems that don't support
	getkerninfo()/sysctl().

	Static routes are now maintained internally on a radix tree. 
	This will speed up configuration and reconfiguration when many
	static routes are configured.  Thanks to Steve Heimlich and
	Dennis Fergusson from ANS.

	On OSF/1 and other systems with a radix tree forwarding table
	that do not have getkerninfo()/sysctl(), some portions of the
	tree were traversed twice resulting in some forwarding table
	entries being deleted from the kernel when they should not have
	been.

BGP:

	Do not send a looped AS path (one in which a given AS appears
	more than once) to external BGP 2/3 peers unless configured to
	do so.  These paths are always sent to internal peers.

	Always send a looped AS path to BGP 4 external peers unless
	configured not to do so.

	Added a missing parameter to a trace statement.

	Failure to recover from a write error.

	If the next hop attribute was not included IBGP 3 would
	dereference a null pointer.

        When doing OSPF-BGP interaction, a null pointer dereference
        would occur when trying to determine the advertising router of a
        deleted OSPF route.

	The BGP MIB RFC (1269) has the wrong type for the Inter AS
	metric.

	Structure containing metrics and next hops advertised to peers
	are stored on a patricia tree with multiple references to each
	unique combination.  This saves memory and processing overhead,
	expecially during reconfiguration.

	Added support for ``type routing'' peers, aka the ``IBGP hack''.

	Add ``logupdown'' keyword to print a syslog message whenever a
	peer enters or leaves the established state.

EGP:

        If an EGP interface when down and then came back up before the
        neighbor entered the IDLE state, the transition back to the up
        state would be ignored.

OSPF:

	A bug caused summary network LSAs to be re-originated every time
	the network summary portion of the SPF was run.

	Collect and report on statistics of number of LSAs generated.

        An incorrect check for the last modification time of a
        self-originated ASEs prevented the refresh of any originated
        within 5 seconds of gated starting.

RIP & HELLO:

	Minor cleanup of maximum packet size calculations.

        If more than one interfaces exist on the same subnet (i.e. same 
        broadcast address), only send updates to the first one found.  

		Changes for the R3_5Alpha_4 distribution

General:

        An incorrect check would allow one more include nesting level
        then the size of the array used to hold nesting state.

	A yacc/bison error would occur when EGP was defined without BGP.

	With certain versions of flex, %include directives would result
	in a core dump.

	When a generate route's primary contributor was a route to a
	point-to-point interface, the wrong router was used.  The
	correct router will now be used.  In the case of other interface
	routes and any routes without next hop routers, the generate
	route will be installed as an aggregate (i.e. a reject route)
	but the AS path will be correct for a generated route.

	Some AS path code would not compile with the Ultrix 4.2
	compiler.

	If no tracing file was active, gated would core dump if
	traceoptions were specified in the configuration file.

	Gated would not detach from the controlling terminal if a trace
	file was specified on the command line.

	A core dump would result when routing traffic was not heard from
	on an interface that was not marked as passive.

	If a trace file was specified on the command line, gated would
	close it while daemonizing.

	Added nochange, noflushatexit and remnantholdtime options to
	kernel forwarding table interface.  See documentation for
	details.

	If a status dump was initiated with foreground or background
	jobs in the queue and infinite output loop would result.

	A core dump could result from an assertion failure during a
	graceful shutdown.  Usually only with RIP in broadcast mode.

	A core dump could result when an interface that was timed out
	comes back up.

	A core dump could result when tracing routes from BGP.

OSPF:

	A previous fix to the problem of incorrect sequence number
	comparisons causing data base exchanges to fail was incorrect
	and was removed. 

	A core dump could occur when attempting to join the all_dr
	multicast group on a non-broadcast interface.

	If a maxage LSA was received that we did not have, the ack could
	be sent out with an invalid timestamp.

	ASE LSAs would not be refreshed at the same configured rate as
	they were generated.

	A core dump could result when installing a updating the route to
	a network when the old LSA has gone away.

RIP:

	Add ripin and ripout keywords to allow RIP to be turned off on
	all interfaces, then enabled on a few.

HELLO:

	Add ripin and ripout keywords to allow HELLO to be turned off on
	all interfaces, then enabled on a few.

Redirects:

	Add ripin and ripout keywords to allow Redirects to be turned off
	on all interfaces, then enabled on a few.

		Changes for the R3_5Alpha_3 distribution

General:

	The task_block_free() and task_block_free_clear() macros did not
	allow for a changing argument.

	Add GDC_TZ_HACK to allow the TZ environment variable to be
	passed from gdc to gated.  This is necessary on systems that
	rely on this variable for all timezone information instead of
	obtaining the local timezone information from configured
	information. 

	Include stdlib.h on systems that support it.

	A stray assert() was causing premature termination while
	scanning the interface list.

	A bug in the policy code was improperly releasing policy
	structures causing policy not to work under some circumstances.

	A bug in the routines to read routes from the SunOS 5 kernel was
	not doing the proper internal magic on the mask which caused a
	core dump later on.

	Interface routes learned from the routing socket were confusing
	the interface code and could cause a core dump.  Install these
	routes as kernel remnants.  They will be overriden by a gated
	interface route, or timed out after three minutes.

	Memory allocation routines now keep statistics per block type.

	A memory leak of eight bytes per received packet (except BGP
	packets) was fixed.

	The WTERMSIG() macro in AIX 3.2.? in _BSD mode does not strip
	the stopped bit and returns a bogus signal number.  To prevent
	future problems of this sort, add code to range check signal
	numbers before looking them up in the sys_signame[] array.

	Somewhat of a port to IBMs AIX/ESA, gated compiles, but has not
	been tested.

	The canned dependencies provided for systems where make depend
	does not work only included dependencies for protocols and
	options defined on the system where these dependencies are
	built.  Attempt to build dependencies for all protocols.

	If a gated configuration check returns a zero return code,
	implying no parse errors, gdc makes sure the file size of the
	error log has not increased.  This is necessary because some
	yacc generated parsers do not properly report parsing errors.

	The physical layer address was not being handled properly.  In
	particular, if the address was present after not being present
	gated would core dump.

	Improper refcounting of dest/mask lists lead to failure to free
	adv_entrys during reconfiguration.  Incorrect assumptions about
	precedence lead to failure to free config_lists.  Null pointer
	dereference in code to free config_lists could result in core
	dump.

	Configuration keyword lookups are now done with a patricia tree
	instead of a binary search.  This made a difference for parsing
	configuration files, but only a small one.

	Gated could coredump while processing an interface route learned
	from the routing socket.

	A check to prevent installing protocol routes to the interface
	they were learned on was catching routes with the same
	destination but different masks.

	Add a second preference (only supported by some protocols at the
	moment) which is used as a tie-breaker between routes with the
	same preference, AS and metric.

	RIP, HELLO, redirect, kernel and interface route timeout were
	not being handled properly.  At some times the timeout interval
	could be doubled.

BGP:

	BGP version 3 unreachables were being sent with the peers
	address where the local address should have been used.

	A small window existed where a BGP peer could be deleted while a
	pointer to it was cached by the MIB code.  This could result in
	a core dump.

	Version negotiation was broken.

	A previous change to fix a byte-order problem overwrote the
	segment length.  This resulted in a core dump.

	Routes were being sent to BGP 2/3 peers with incorrect metrics.

	Some routers would crash when receiving the aggregator attribute
	with the partial bit set.  We no longer set the partial bit for
	when receiving the aggregator attribute from BGP 2/3 neighbors
	and no longer send that attribute to BGP 2/3 peers.

	The IBGP active peer bit was sometimes getting set on a totally
	random route from among the alternates, causing problems later
	on.  Fixed the typo.

	Fixed a couple of reconfiguration memory leaks.

	Some BGP 4 implementions don't use updates sent in place of
	keepalives.  Added a `keepalivesalways' flag to allow
	interoperability with these peers.

	BGP would ignore the setting of `nogendefault' and always cause
	a default route to be created when `options gendefault' was in
	effect.

	Allow specification of TTL since BBN T20s drop packets with a
	TTL of one.

	Allow specification of `preference2' to allow selection between
	routes with same preference, AS and metric.

	A certain sequence of events could result in an assertion
	failure.

EGP:
	
	A bug in the handling of tracing would cause an assertion
	failure during reconfiguration with on a group with more than
	one neighbor.

	A small window existed where a EGP neighbor could be deleted while
	a pointer to it was cached by the MIB code.  This could result
	in a core dump.

	Allow specification of TTL since BBN T20s drop packets with a
	TTL of one.

	Allow specification of `preference2' to allow selection between
	routes with same preference, AS and metric.

	Preference argument may now be specified per peer.  Don't cause
	peer reset when preference is changed as re-evaluation of
	preference is already done during reconfiguration.

	Certain error conditions resulted in a peer going idle for 60
	minutes.  Two minutes seems more appropriate.

OSPF:

	An incorrect sequence number comparison could cause the database
	exchange process to fail.

	Increase the send buffer size on OSPF monitor responses.

	The netmask was not being ignored on hellos received on P2P
	interfaces as it should have been.

RIP & HELLO:

	When not supplying updates, RIP & HELLO were not creating the
	timers necessary to age routes.

		Changes for the R3_5Alpha_2 distribution

General:

	Remove the warnings when two interfaces on the same logical
	network are detected.  This is legal.

	Restructure timer support to allow a variable number of timers,
	this is required by DVMRP and router discovery.

	The inet_prefix_mask() macro was missing parens, causing
	incorect code to be generated.

	Gdc was not recognizing resource based options due to a
	backwards #ifdef.

	Aggregation code was doing first match instead of best match.

	Make use of features of flex 2.4.6 that allow included files
	without having to resort to an interactive scanner.  Use
	un-buffered reads when possible.

	Porting to DEC OSPF-1.2-alpha.

	Certain sequences of events could cause non-Active routes to be
	stuck with the Active bit on.

	Metrics specified on the first line of export clauses were not
	checked for bounds.

	Gated would corrupt memory on some systems due to off-by-one and
	length miscalculation in sockaddr allocation routines.

	On systems that use the ioctl interface to the routing table
	(i.e. they don't have the routing socket), do not log an error
	when an add of an interface route already exists.

OSPF:

	Remove per-interface task since this was only used to hold timer
	pointers.

	OSPF was not always properly releasing down interfaces.

	Summary routes were not always being created properly.

BGP:

	Finished support of "outdelay".

	Removed support of "importdefault" and "exportdefault" since
	this can be done with policy.

	Use the multi-exit discriminator to resolve local preference
	ties in bgp_sync.c.

	Repairs for reconfiguration, particularly getting trace
	structures alloc'd and free'd correctly.

	Also fixed a faulty assertion which failed when a flash update
	for a group didn't find any new routes but there were routes
	queued for out-of-sync peers.

	
	
		These are the changes for the R3_5Alpha_1 distribution

General:

	The size of the TSI allocation array was being incorrectly
	calculated, this could result in core dumps if all the available
	TSI fields were used.

	When formatting ASPATH NFAs, print a '*' to indicate accept
	state to compress output.  Display NFAs as they are being
	created. 

	Allow `LOCAL_VERSION' option in build environment configuration
	to add local information to the version string.

	Document fixes required to compile mib/rt.my with ISODE 6.8 mosy
	on AIX 3.2.

	Routine to free gateway lists did not insure that a gateway
	existed before freeing it.

	Allow routes with off-net gateways if RTS_NOTINSTALL is set.

	Certain trace options (nostamp, mark, parse, adv) would not be
	accepted as the first argument to the `traceoptions' statement.

	Support MARK in the tracelog via `options mark <interval> ;'
	instead of `traceoptions mark ;'.  Also allows the interval to
	be configured.

	AIX 3 by default makes little useless core dumps.  Add code so
	gated will request full dumps for signals which cause abnormal
	termination. 

	Improper check in gd_{upper,lower}() against the length of the
	buffer could result in writing the terminating null past the end
	of the allocated memory.

	On HP-UX systems, including -lBSD in the load path picked up the
	wrong version of setpgrp().  The solution was to remove -lBSD
	and use the getcwd() emulation of getwd().  Also use our private
	copy of install on these systems.

	If the preference specified on the gendefault option was changed
	it would not be updated by a reconfiguration.  Add `gateway'
	parameter on gendefault option.

	For portability, use sendto() instead of sendmsg().  Use
	recvfrom() on systems that do not have the advanced features
	that require recvmsg().  Remove recvmsg emulation from
	compatibility library.

	Only compile compatiblity routines required for the target
	system.  This eliminates the need to include libc twice (which
	does not work on systems with shared libraries).

	Interface names that were keywords were supposed to be quoteable
	(""), but it did not work.

	Routes that were pending in the routing socket queue were not
	being displayed properly in a status dump.

	RouterID and OSPF virtuallink neighbor may now be specified
	symbolically.  In general, everything but netmasks may be
	specified symbolically.

	Added high priority timers which are checked very often and used
	for critical function, like OSPF adjacencies.  Added foreground
	and background jobs which are used for deferred processing, such
	as SPF calculations, propagation of route changes, and updating
	the kernel.  These changes allow gated to better handle periods
	of high load without losing peer relationships.

	Re-wrote the kernel interface(s) to queue requests for changes
	to the kernel routing table and process them a few at a time in
	the background.  The kernel-independent interface has multi-path
	support.

	Routing socket interface will now accept route add and route
	change requests that fail as requests to add `kernel static'
	routes.  Deletes will only be honored when an attempt is made to
	delete `kernel static' or `redirect' routes.

	Maintain a queue of routes added by each gw_entry.  This
	removes most need to scan the complete routing table.

	Include <stddef.h> on systems where __STDC__ is defined and
	NO_STDDEF_H is not defined.  This gets the system version of the
	offsetof() macro if available.

	Remove rtlist_all() and rtlist_active() since they scan the
	whole routing table.

	Maintain seperately linked queus of tasks with active recv,
	write, except and flash methods to avoid scanning long lists of
	tasks.  Especially with alot of BGP internal peers.  Add low
	priority reads for egps and optimize select calls.

	Dennis rewrote the radix tree routing table and optimized it
	for the routing function (vs the forwarding function).

	Curtis, Dennis and Jeff rewrote the destination/mask list
	processing to use a radix tree for much faster inserts and
	lookups. 

	Rewrite of aggregation for speed and efficiency.  Added
	route `generation' support.

	Allow for loopback interfaces with non-loopback addresses shared
	with P2P interfaces.

	Give GDC the ability to set limits (coresize, filesize,
	stacksize, datasize).  On Certain systems the default size of a
	core dump is very limited, this will allow a useful core dump to
	be obtained from gated when started via gdc.

EGP:

	During policy evaluation the search for a previously announced
	route was not extensive, which caused routes to be missed.

	Gateways were not being added to the list at the end, resulting
	in potential duplicates of my own addresss.

	If the polled address changed, the old one would be orphaned.

	EGP would not sort neighbors properly, and might core dump on
	little endian machines.

	EGP would get out of sync on an update containing network 127. 
	The update parsing code does not need to ignore this network as
	the martian code will catch it when it is added to the routing
	table.

OSPF:

	The check for a forwarding address being one of my interface
	addresses was broken.

	During reconfiguration/termination, OSPF did not reset the
	pointer to the area list before starting to delete areas,
	possibly causing a core dump. 

	OSPF did not free gateway pointers during termination.

	The ADV_ALLOC() macro had an if with two identical cases.

	There was an typo in the NBRS_LIST() macro that caused it to
	reference an incorrect variable name.  Luckily, it's usage was
	such that this never caused a problem.

	Insure that the only interfaces active when
	ospf_area_terminate() is called are disabled, i.e. they don't
	have tasks.  Same for ospf_terminate() and virtual interfaces.

	On Ultrix systems P2P interfaces are listed before non-P2P
	interfaces.  This uncovered a bug where OSPF was comparing to
	the network of an interface without making sure it was not a P2P
	interface. 

	OSPF now only joins the multicast group for designated routers
	when operatating as DR or Backup DR on that interface.

	Display cumulative error logs in gated_dump file.  Display ASEs
	last as they tend to create the most output.

	Code to disable reception of our own multicast packets was not
	being called after OSPF reinitialization.

	Do not set the forwarding address for ASEs to be a gateway on
	the end of a P2P link.

	Routes to attached interfaces were mishandled, resulting in the
	possibility that the OSPF route would be used instead of the
	interface route.  This would result in improper flag settings (G
	flag missing) and improper routing.

	During OSPF termination structures were deleted that were still
	in use by OSPF routes in the process of being deleted.  This
	would result in incorrect logging on some systems and core dumps
	on others.
	
	If the interface that the router-id was derived from went down,
	OSPF would not be completely shut down and a core dump could
	result. 

	Stub hosts other than on the end of P2P interfaces were not
	being propagated.

	OSPF would set the wrong age in the LS headers in LS ack
        packets.  This would occasionally cause the LS advertisements to
        be retransmitted until they were updated.

        Improve OSPF error statistics and logging.  Log critical
        messages to the syslog.  Add `first' and `every' parameters to
	limit the quantity of information generated.
        
        Virtual links were not being brought down when there was no
        route to the specified neighbor, instead they were timing out.
        Also, their cost was not being updated when the cost to the
        specified neighbor changed.

RIP & HELLO:

	Ignore the subnetmask on a P2P interface unless both addresses
	are on the same natural network.

	RIP was not carefully checking the router sent and received in
	RIP-2 updates.

	Added support for RIP-2 authentication on a per-interface basis.
	Specific targets share the authentication with broadcast clients
	on the interface. 

	Maintain lists of routes being announced to each target.  This
	prevents scanning the entire routing table every time an update
	is generated.

	Recongnize `rip no ;' even when RIP is not compiled in.

SNMP:
	Spurious trace lines were generated by a misplaced trace
	statement. 

	Reject routes report an ifIndex of 0, a next hop of 0.0.0.0 and
	a protocol of other.

	If the SMUX connection failed while registering portions of the
	MIB a core dump would result.

	Document problem with rt.my and mosy 6.8 (AIX 3.2).

	Recongnize `snmp no ;' even when SNMP is not compiled in.

		These are the changes for the R3_1Alpha_1 distribution

General:

	The ipForwardInfo and ipRouteInfo variables were not being
	reported correctly.  With the MIBs currently implemented they
	should report OID NULL.

	A typo prevented some of the compatiblity routines from being
	compiled in.  Some of the configurations needed updating since
	old routines had not been deleted from the compatibility
	library. 

	An improperly initialized head pointer would result in a core
	dump if ISO was used.

	When reading a route from the kernel at startup and deciding to
	reject it, make sure an old route actually existed before trying
	to restore it.

	A reject route to net 127 was causing a core dump at startup.

	Protocols with multiple targets per task lead to confusion about
	which target actually set a routing table entry lock bit.  Print
	the bit number to make this information available.

	SunOS 5.* needs to use our version of the install script (or
	/usr/bsd/install if present).

	Added code to use sysctl() instead of nlist() to get values from
	the kernel where possible (BSD 4.4 and BSDI?).

	It was assumed that the interface name was always available
	when updating link level info.  On systems that support the
	interface index in the kernel, using the index is more
	efficient, especially when the interface name is not provided.

	Gated's own random number generator (grand.c) contributed by
	Dennis Ferguson <dennis@ans.net>.

	The code to defer send and receive buffer allocation until after
	protocol initialization was not working properly.  Since the
	problem to be fixed by this defering is no longer a factor, send
	and receive buffers will be allocated immediately.

	Task_get_socket() was reporting the socket type incorrectly.

	Restriction on martian networks relaxed a bit, networks with
	RTS_NOADVISE set may be installed in the routing table.  This
	will allow the 127.0.0.1 interface route and 127/255 reject
	route.

	Create a static route for 127/255 instead of an aggregate.

	Allow for -cc option to mkdep for systems where it is necessary
	to use a different compiler to generate dependencies.

	Martian list was mondo broken.  Reduce the default list to the
	set of reserved networks listed in RFC 990.  Allow ranges to be
	excluded by used of the `allow' option.  Allow configured
	entries to override default entries.  Isntall Martian networks
	in the routing table, just prevent from being installed into the
	kernel or propagated.

	Put signal names into compatibility library in BSD 4.4
	sys_signames[] format.

	The routing socket interface assumed that an RTM_CHANGE message
	can change a route's flags, it can not.

	Best match lookups in the routing table were not working.  This
	primarily affected OSPF ASE forwarding address lookups.

	Move zero subnet detection from routing table into protocols
	that need this support (RIP v0,1 and HELLO).  This will allow
	gated to function on a system configured with a zero subnet.

	The interface code (if.c) was allocating a socket that was never
	used.  This code was never cleaned up when dynamic interface
	support was added.

	Rt_change() was not reseting the delete indication.

	When flock() is emulated via lockf(), GDC has to open the file
	read-write, or the lock will fail.

	On systems based on BSD 4.3 Reno (and later) supporting
	MSG_TRUNC, protocols (in particular EGP) would ignore packets
	that had been truncated.  Modified core code to explicitly
	report this.

	Reference to a non-existing interface by name could cause a core
	dump after reconfiguration.

	Define INSQUE/REMQUE macros to replace insque/remque routines. 
	It is faster to do it inline, except on a VAX with
	post-processing of the assembler source, there we can define an
	in-line assembler function if need be.

	Avoid calling sethostent() and endhostent() if `noresolv' option
	is specified.  This avoids tickling a bug when the shared
	libraries have been updates with resolver routines supporting
	the nameserver.

	A core dump could occur when an interface is deleted.

	A bug caused all inserts into dest/mask lists to be appends,
	making performance miserable for a large number of networks.

	A route could be lost when adding a duplicate key due to errors
	in the code that sorts them by most specific netmask.

	Allow static routes with subnet masks that might not be accepted by
	the kernel.  They may be useful even though they won't be
	installed on kernels not supporting variable subnets.

	Attempt to function on AIX 3.2 systems when compiled with
	_BSD=44 but running with compat_43=1.  Basically, make some
	assumptions about socket lengths.  The ability for RIP to
	determine which address a packet was destined for will be lost.
	And ISO stuff may not work at all, but that is not standard AIX.

	Enhanced a cleanup routine for EGP-IGP interaction.

	The man pages now indicate a revision date of the last time they
	were checked in.

BGP
   
        A core dump could result when a BGP local address is specified  
        and a status dump is requested.

	Because some BGP implementations occasionally send bogus next
	hops we will simply ignore the next hop instead of the route.
   
EGP

	If EGP was configured off and then back on, it could core dump
	because it incorrectly zeroed the pointer to the data area it
	uses to sort EGP peers for MIB queries.

	Add more checks that actual count of bytes received matches that
	specified in the header.

	Add an awk script and Makefile gunk to build RCS version ids
	into verion.c in such a manner that they can be interpreted by
	RCS' `ident' program and SCCS` `what' program.

	SunOS 5 enforces the requirement to call bind() before
	connect(), even on raw sockets.

	The AS Path code did not allow for an EGP session with the same
	local and remote AS.  In essence, EGP is being used as an igp,
	but that's how BGP was born....

RIP & HELLO:

	In some cases a core dump would result from duplicate attempts
	to release a routing table bit.

	With nobroadcast, and a source gateway on the end of a
	point-to-point interface, no updates would be sent to that
	interface.

	Add RTS_IFSUBNETMASK bit to make it easy to determine which
	routes derrived their subnet mask from the interface when the
	interface netmask changes.  Other fixes for dealing with netmask
	change.

	When an interface goes down, delete any routes learned from that
	interface.  HELLO did this, RIP did not.
	
	RIP will announce *allow* networks, subnets and hosts to full
	version 2 peers.  Aggregate routes default to a single hop.

	RIP & HELLO could sometimes lose track of routes they had in
	holddown.
	
        A list of routes obtained by RIP & HELLO could be stale before  
        it was used causing a reference to a route that has been
        deleted.  Defer obtaining this list until it is needed.

	RIP and HELLO will not automatically aggregate hosts routes,
	that needs to be done with policy.

	In HELLO and in RIP when masks are not specified, the zero
	subnet is treated as such, not as the network.  If this is not
	wanted, it will have to be rejected via policy.

	Set RTS_IFSUBNETMASK on hostroutes of a subnetted network in
	case the mask changes.

OSPF

	If there were multiple links to another router, the lowest IP
	address was used instead of the best metric.

	OSPF was not cleaning up after reconfiguration if it was
	disabled.

	ASE LSDB entries were not being freed before reconfiguration.

	Only list P2P OSPF neighbors in a Router Links LSA when the
	neighbor is full.  This allows the use of alternate
	connectivity.
	
        After reconfiguration the router links LSA was not always being
        rebuilt, causing problems when an old one was received from a
        neighbor.

	More reconfiguration fixes.

	The forwarding address for ASEs was not being displayed in the
	status dump.

	The forwarding cache was not properly allocating next hop blocks
	resulting in an occasional core dump.

        On an interface with a large MTU (4352), OSPF would dump core
        when tracing was enabled.

	When the metric changed on a non-ASE route, the route entry was
	not updated.

	Responses to OSPF monitor request create task (at most one per
	address/port) with a non-blocking socket for each request.  This
	will prevent monitor requests from hanging gated.

	When OSPF terminated, it didn't release any routes it had been
	announcing, nor did it clean up any entries in the export queue.

	When running in multiple areas, OSPF improperly assigned indexes
	to the lock timers for each area.  The only notable symptom is a
	core dump at shutdown.

		These are the changes for the R3_0Alpha_9 distribution

General:

	Log the value of compat_43 on AIX 3.2 systems.  I'm not yet sure
	if this value is important though.

	Do interface initialization before protocol inits instead of
	before first ifa_change, some functionality dependent on
	interface policy was not being run in time.
	
	Forgot to tell CVS about krt_symbols_sunos5.c.

	For AIX on the RS/6000, print a warning if 4.3 compatiblity is
	enabled.

	Support for BSD 4.4 sysctl() (a replacement for getkerninfo).

	On systems with P2P interfaces that share a local address with a
	non-P2P interface, create an RTS_NOTINSTALL route for this
	address to prevent protocol routes (OSPF) from forcing local
	packets to traverse a P2P interface.

	Unfinished work on Route Aggregation, delimited by
	ROUTE_AGGREGATION (should have no affect if this is not
	defined).  Use/test at your own risk!

	When an interface specification could be an interface name (i.e.
	le1) or a symbolic host name, prefer an existing interface name
	to prevent a DNS lookup.  Also add `noresolv' option to disable
	host table or DNS lookups.

	On some systems allocated memory was not being cleared.

	Automatic detection of byte order was not working properly,
	allow specification in Config file.

	RIP and INET were not properly handling an interface address
	changing and multicast memberships surviving.

	An OSPF sumnet for an interface route would cause a core dump. 
	Instead of having the routing table reject a protocol installed
	interface route, flag with RTS_NOTINSTALL and RTS_NOADVISE so it
	won't be used.

	Interface route changes learned from the routing socket were not
	being handled properly.

	Specifying a relative trace file name would result in multiple
	frees.


OSPF:

	A virtual link with no optional parameters would cause a core
	dump.

	Improve formatting of ospf_monitor responses for virtual links.

	A core dump resulted from incorrectly attempting to initialize
	virtual links at init time. 

	A core dump resulted from trying to reference the task on
	virtual links that were not up.

	The virtual link MIB information was not being initialized.

	OSPF termination was not cleaning up OSPF routes from the
	routing table.
	
	Fix some byte ordering problems.

	The area range list was not being cleaned up at reinitialization
	time. 


		These are the changes for the R3_0Alpha_8 distribution

General:

	Restructured kernel routing table interface to increase
	portability to different interfaces.

	Support for SunOS 5.0 and fixes for STREAMS based systems in
	general.

	Restructured configuration process by removing system defines
	and adding specific defines for differences between systems. 
	These defines are now specified in the Config file instead of
	being automatically determined in config.h.  Due the the large
	number of defines, they are now written to defines.h during the
	configuration process.

	Blocks larger than half a page were being misallocated in the
	task_block code, causing a core dump.

	While parsing, print metrics as unsigned.

	Fix a core dump when parsing an unterminated C-style comment.

	Routing table MIB was inefficiently handling the loss of a
	cached route.

	Removed MIB_IPFORWARD define, always support the forwarding
	table MIB when SNMP is configured.

	Fix a core dump reconfiguring w/o a trace file.

	More robust checking for IFF_POINTOPOINT interfaces on which
	destination addresses have not yet been configured.

	The starting directory was not being prepended to the trace file
	name. 

	Gdc's use of BSD specific setreuid() was not necessary, setuid()
	is sufficient.

	Improved building of canned dependencies for systems that can
	not properly build them.

BGP:

	Fixed a BGP dynamic interface bug when communitcating on point-to-point
	interfaces. 

ISO:

	Calculate system IDs before protocols get initialized.

OSPF:

	The MIB code was not handling AddressLess interfaces properly.

	Stub hosts would be included in a Router Links LSA even if they did not
	have a NH entry (i.e. OSPF was not yet aware of the interface)
	causing an assertion failure.

RIP:

	Ripquery would go into an infinite loop on AIX 3.2.


		These are the changes for the R3_0Alpha_7 distribution

General:

	Gdc - operational user interface to gated, submitted by Dennis
	Ferguson <dennis@ans.net>.

	Integrate man pages into gated compilation/installation process
	with use of modified version of inst-man.sh from ISODE 7.0

	Add a few `const' attributes to force constants into read-only
	storage.

	Potential core dumps when updating kernel routing tables on
	systems with the routing socket.

	If a relative path for a trace file was specified, toggling
	tracing off and back on would cause it to end up in /usr/tmp.

	Print current send and receive buffer info in status dump.

	Improved diagnostics for routes read via the routing socket or
	getkerninfo() and not used.  Improved detection of ARP entries.

	Previous fixes to routing socket code omitted clearing routing
	socket message blocks before they were allocated.

ISO:

	Generate System ID as a sockaddr_ll, type LL_SYSTEMID, leave off
	NSEL and format as XXXX.XXXX.XXXX.  Was not being calculated
	correctly.

	Incorrect length was used in sockbuild_iso() when a netmask was
	read from the kernel.  This occasionally resulted in writing off
	the end of an allocated block, usually corrupting the task
	chain. 

OSPF:

	An incorrect test would cause OSPF not do remove an interface
	from the AllDesignatedRouters multicast group.

Redirects:

	An incorrect test would cause redirects to be ignored.

	Host redirects were not being handled properly.


RIP & HELLO:

	An incorrect test might cause RIP and HELLO to start
	broadcasting packets when they were configured not to.

HELLO

	Hello was updating it's metric history information after
	deleting a route instead of before.


		These are the changes for the R3_0Alpha_6 distribution

General:

	Indicate whether kernel routing table was being updated in KRT
	task output instead of RT task output.

	If -n flag was specifed, then reconfiguration (SIGHUP) took
	place, gated would start updating the kernel routing table.

	Fix src/Makefile to print a message if obj dir can not be found.
	
	If a tracing file existed that was larger than the specified
	limit, an empty .0 file would be created.

	Tracing and status dumps could not be performed if the specified
	file name was a pipe.

	Locking is now done on the status dump file to make sure two
	gated process do not attempt to write to it at the same time.
	If the file is locked the subprocess will wait a few seconds and
	try to write to the file again, giving up after 10 failures.

	Add -C option to do just a syntax check of gated configuration
	file. 

	Interface policy lists were not being allocated properly, and
	entries after the first would be freed at the first UP->DOWN
	transition. 
	
ASPaths:

	Patterns ending in .* and .+ were not working properly.


BGP:

	OPEN collisions would cause a core dump.

	Bugs in Dynamic Interface support.

OSPF:	

	Print and log a warning message when "priority" is used on a P2P
	interface or a Virtual link.  Fixing it in the parser is more
	trouble than it is worth.

	Fix a core dump when receiving an LSU packet from a P2P peer.

	When areas were not configured in order, they could be lost.

	Backbone area no longer needs to be specified last, virtual link
	resolution will take place after parsing.

	OSPF monitor request for LSAs with a next hop of a local
	interface would cause a core dump.

	OSPF reconfiguration by shutting down and restarting OSPF. 
	Sorta graceful shutdown by informing neighbors we no longer
	exist.

	OSPF MIB would not correctly report neighbors on P2P interfaces.
	Potential to write past end of block used to hold list of
	neighbors.  

	OSPF NBMA interfaces will only select list of neighbors that
	is reachable via this interface.  This would allow a global
	specification of neighbors.

		These are the changes for the R3_0Alpha_5 distribution

General:

	Dynamic interface support could cause the next task in the list
	to be deleted causing a dereference of a null pointer.

	Interface import policy was not working.

	Router ID could have been selected from a down interface.

	Some compilation problems on SYSV.

	If a second copy of gated is started it would delete the PID
	file after determining it was locked.

	Fix memory management problems with blocks larger than a page.
	
	Minor changes to the R3 License.

	Removed inet specific RTS_HOSTROUTE and RTS_SUBNET flags. 
	Fixes several minor problems (like being unable to tag a host
	route as INTERIOR or EXTERIOR).

	Control message info processing was not robust on Reno, Net-2
	and BSD 4.4 systems.

	Destinations with no routes could remain, especially after
	static routes were removed during reconfiguration.

	Static routes now allow any number of next hops, only the first
	RT_N_MULTIPATH valid ones are used at one time.

	By default, gated will try to construct the name for gated.conf,
	gated.pid, gated.version and gated_dump from the name of the
	executable (argv[0]).  This is mainly used for testing bug can
	also be used to override the locking done on /etc/gated.pid.

	Indentation was incorrectly handled when printing interface
	policy.

	Conditionally compile code that references AF_UNIX, not all
	platforms that gated runs on have it.

	Installing interface summary routes with RTS_REJECT is wrong in
	many cases, use RTS_NOTINSTALL.  Network reject route can be
	obtained with a static route until aggregation policy is
	implemented. 

	Ospf_monitor was left out of make depend.

	Interface policy (import and export) was not being handled
	properly.  If an interface went down it's policy would not be
	restored when it came up.

	Several of the default preferences mentioned gated-config man
	page were wrong.

	Use advisory locking on trace file to prevent to gated processes
	from writing to it at the same time.

	If the local address of a point-to-point link or the netmask of
	any interface changed, gated was not fixing the interface route.

	Print the interface address as well as the name for each next
	hop of each route.

	Assume point-to-point interfaces with the same local and remote
	addresses are undergoing loopback testing and completely ignore
	them.

	Deering's multicast code will leave groups when an interface
	address changes; modify RIP, OSPF and INET code to allow for
	this.

	If the flags on a static route (retain, reject) were changed
	during reconfiguration, the routing table would not be updated.

	Getdtablesize() and sysconf(_SC_OPEN_MAX) do not always return
	usable values.  Recode so it is not necessary to use them.

BGP:

	Support for dyanmic interfaces.  Changed "interface" paramter to
	"lcladdr" parameter.

	Fixed bugs in reconfiguration.

	Added sendbuf and recvbuf options to tailor kernel send and
	receive buffer sizes.  Added spoolbuf option to spool updates
	when kernel buffers fill up with update information.

EGP:

	Support for dynamic interfaces.  Changed "interface" parameter
	to "lcladdr" parameter.

	If an invalid class network (not A, B or C) appeared in an
	update, the diagnostic would report 0.0.0.0 instead of the
	offending network.

	Improved memory allocation strategies for scanning interfaces
	and managing the routing socket output queue.  This will
	greatly reduce the memory usage when the kernel can not accept
	output to the routing socket.  Should also allow gated to adapt
	quickly to systems with a large (over a hundred) number of
	interfaces.

HELLO:
	
	Use `>> 2' instead of `* .25' in HELLO_HYST() macro to avoid
	use of floating point.

ISIS:

	Changes in this code include fixes (mostly casts) to make
	compilers happier and a rewrite of the reachable address prefix
	portion of the local link state database.  The new code
	optimizes for prefix changes rather than for PDU construction,
	and it groups prefixes with similar path attributes in the same
	LSP whenever possible in an attempt to minimize flooding
	expense.

	
OSPF:

	A core dump would sometimes result because a control block
	reference count was not being increased when.

	A core dump would sometimes result when specifying NBMA
	neighbors.

	ASE LSDBs specifying a forwarding address would not be
	installed.

	Initialization message for virtual links incorrectly assumed the
	presence of a protocol address.

	Configured interface cost was not being properly handled.

	Improper handling of an interface going down.

	Gated structures associated with an interface whose address had
	changed were not being cleaned up.

	Specification of non-broadcast on a broadcast capable interface
	did not work.

	Prevent core dump in status dump file when an empty entry is on
	the retransmit list.

	An interface netmask change would not be handled properly.

	The next hops for a route could be mangled on multipath routes. 
	One possible symptom would be a findforward failure.

	Routes for Type 1 ASEs were being deleted and readded every time
	the ASE portion of the SPF was run.

	Between the time an interface changes and gated notices it, OSPF
	would quit because it could not set the interface for an
	outbound multicast packet.  The solution is not to send the
	packet and wait for the interface change notification.

	An OSPF packet received via an interface not configured to run
	OSPF could cause a core dump.


RIP:

	A specification of 'version 1' would cause a core dump.

	Responses to the ripquery program where broken when gated was
	running on little endian machines.

	If RIP was announcing a route to an interface that toggles up
	and down before the holddown could complete, RIP would "forget"
	about the route in holddown resulting in many copies of the
	interface route hanging around.

	Gated would send it's routing table request before it determined
	that an interface was running version 2.

	On interfaces multicasting version 2, gated would reply to
	routing table requests from routers that would not hear the
	multicasts.  Added checks to verify that the request is version 2
	and was multicast before responding to it.  On systems where the
	packet's destination is unknown we will not respond to these
	requests to be safe.


		These are the changes for the R3_0Alpha_4 distribution

General:

	Ultrix systems don't obey setlinebuf() or the setvbuf()
	equivalent, use fflush() after every write.

	The parser tried to print a mask that was not find when
	"default" was specified in a policy list.

	The routerid was being selected from the interface list before
	configuration then being changed by the selection from the
	configuration file.

	If the socket/task association was removed processing the read
	(accept) routine, the write (connect) routine could also be
	called.  SNMP exercized this bug.

	In policy lists the mask for a host route should be NULL, the
	parser did not always set this properly and there was one
	unintentional reference to a NULL mask.

	When configured to rotate trace files, put a message indicating
	such at the end of the old file.

	Allow an "except" argument on some traceoptions statements which
	allows allows bits to be reset, allowing specifications such as
	"traceoptions all except hello ;".

OSPF:

	When in the presence of Multicast OSPF, don't complain too
	loudly about GroupMembership link state advertisements.

MIB:

	Some of the necessary MIB files were not included in the
	distribution. 


		These are the changes for the R3_0Alpha_3 distribution

General:

	Split system define SUNOS into SUNOS4_0 and SUNOS4_1 as there
	are a few POSIX differences between the two.

	Provide a setvbuf() emulation in the compatibility library and
	replace setlinebuf() and setbuf() calls with setvbuf() calls.

	RIP and HELLO do not broadcast by default if IP forwarding is
	disabled in the kernel.

	RIP will refuse to start if UDP checksums are disabled in the
	kernel.

	Some System V porting issues.

	Check for an write PID file before starting protocols.  This
	insures that we notice if another copy of gated is running
	before error messages are generated about not being able to
	obtain sockets.

	A typo in a check for multipath being enabled prevented a
	warning at startup when used with Unix kernels (which don't
	support multipath).

	Change tracing of lexical analyzer from TR_LEX (lex) to
	TR_PARSE+TR_PROTOCOL (parse protocol) to reduce the number of
	tracing flags defined.

	Remove support for a hex string with an ODD number of nibbles.

	The multicast and reject keywords will be undefined (and cause
	syntax errors) on systems where IFF_MULTICAST and RTF_REJECT are
	not defined.

	Add facilities for parameter lists used by dynamic interface
	configuration stuff.

	SNMP queriest of Multicast routes give gated gas, configure the
	get-next code to skip them.

	AS path pattern matching assumed a .* on the end of the path
	when it should not have.

	It was not possible to specify a non-contiguous mask in the
	configuration file where it should have been valid.  In
	particular on the martian and BGP allow lists.

	The "powerful" SNMP get next operator would sometimes return a
	value less than the specified one.

	Implement %include and %directory in the lexical analyzer
	instead of in the parser which will allow them to be used within
	compound statements.

	Defined HAVE_STAT for systems that have the stat() system call.

	The MIB code could cache a pointer to a route that has gone away
	(or could even be reused) which can result in a core dump (or bogus
	data). 

	Grab 802.3 physical address from kernel on systems that do not
	provide it via the routing socket.  This is hack reads the ifnet
	list and assumes that each ifnet for an interface with
	IFF_BROADCAST set is part of an arpcom structure and is
	immediately followd by the physical address.  Right now this is
	only need by systems supporting IS-IS. 

	Allow setting of syslog level mask with "syslog" option in
	config file.

	Fix a few memory leaks during system interface scans.

	Improved handling of errors caused by inability to obtain socket
	or errors reading kernel namelist, espeically when running in
	configuration test mode.

	Add "upto" parameter to "syslog" option.

	A SIGUSR2 will cause gated to rescan the interface list.

	Writing to and locking of /etc/gated.pid was not working.

	Restore routes to timed out interfaces at termination.

	Be a bit more robust in the face of errors received when
	changing the kernel routing table.

	Allow the specification of the "down" preference for an
	interface, i.e. the preference used when gated determines that
	it is not receiving routing updates on the interface when it
	believes it should.
	
	The pre-configured martian list was not being parsed correctly.

	Rewrote support for router-id with dynamic interfaces.
	Specified router-id does not have to be the address of an
	interface.

	Gated was not correctly reporting MIB protocols for some routes.

	IP multicast group default routes (which are a workaround for
	bugs in the IP multicasting code) are no longer handled in the
	routing table, but in a seperate table in inet.c.

	Use knlist() instead of nlist() on AIX for the RS/6000.

	Move task_udpcksum and task_ipforwarding to inet_udpcksum and
	inet_ipforwarding.  Display in gated_dump file.

BGP:

	BGP forgot to reset the write-failure bit between connections,
	preventing a connection from being re-established after said
	failure. 


BGP-OSPF:

	In the degenerate case where BGP-OSPF interaction is configured,
	but OSPF is not configured to export any routes, the internal
	BGP session would not be initiated.


HELLO:
	Improve logging of what HELLO is doing after interface status
	changes.


RIP:

	Add RIP_MIB option to include the incomplete MIB support for
	RIP. 

	Improve logging of what RIP is doing after interface status
	changes.

	During graceful terminate RIP would try to access a timer after
	it had been deleted.


OSPF:
	
	OSPF MIB variable ospfIfPollInterval was misspelled.

	OSPF would core dump if an alternate address on a loopback
	interface was listed as a stub host.

	OSPF dynamic interfaces.

	OSPF routes to direct interfaces (which are only in the routing
	table for OSPF's convienience) were interfering with interface
	routes which had timed out (gone to a lower preference).  They
	are now installed with a negative preference (i.e. hidden) to
	prevent interference with other protocols.


ISIS:

	Updated ISIS code from Steve Heimlich, now includes some notes
	on configuration in ISIS-config.ps.  Uses gated for managing all
	routes.


		These are the changes for the R3.0Alpha.2 distribution

General:

	By default, add routes to the local end of the P2P link via
	the loopback interface with a preference of
	RTPREF_DIRECT_SUMMARY.  This will allow them to be easily
	overridden (such as by OSPF), but put them there by default,
	even if no routing protocol is running.

	More dynamic interface support.  Now protocols are notified
	about MTU, metric, netmask, localaddr, broadcast and updown
	changes about addresses and MTU, metric, lladdr, selector and
	updown changes about physical interfaces.

	The routine rt_change() was not defined if AS paths were not
	being used (i.e. neither OSPF or BGP were configured).

	Routes to the local addresses of P2P links via the loopback
	interface are added by default.  They are installed with a
	medium preference (between those of IGPs and those of EGPs) so
	they may be overridden, for instance, OSPF can route packets
	for the local address across the link and back so you can use
	ping to determine if the interface is working.

	Join the ALL ROUTERS IP multicast group on any interfaces
	running an IGP.

	Print the file name when unable to open the status dump
	(gated_dump) file.

	Gated now compiles on HP/UX 7.0 and HP/UX 8.0.

	Many of the protocol specific interface flags were getting reset
	when they should not have been.

	Maintain a list of local addresses which is used in determining
	when the routes mentioned above should be installed.

	If two routes with the same preference were available, the logic
	to choose between them by lowest gateway IP address was flawed,
	causing unpredictable behaviour.

	Maintain a list of non-local addresses which is used by policy
	for matching interfaces.  Remove policy support for pointer to
	interface address structure.

	Some SYSVR4 bug fixes.

	Static Interface routes are now dealt with dynamically so they
	don't require a pointer to an interface at config time.

	Use the socket opened for routing table updates to determine
	the maximum packet size, SYSV systems don't allow these tests
	on AF_UNIX sockets.

	Maintain a list of interface names and interface name
	wildcards as interface address entries.  This greatly
	simplifies and accelerates policy matching by interface name
	and interface name wildcard.

BGP:

	AS Paths were not being properly checked for loops.


ISO:

	Fix up ISO support to the point where it recognizes ISO
	interfaces and allows the addition of static routes via the
	config file.


OSPF:

	Properly handle receiving a route to the local end of a P2P
	interface from a neighbor.

	Virtual links would fail when their first hop was via a
	P2P link.

	Defer initial SPF runs until the end of the initialization
	process. 

	Virtual links would cause a core dump sometimes when interface
	status changed occured.

RIP & HELLO:

	Modify to correctly reconfigure after reconfiguration and/or
	interface status change.

	RIP was sending an improper mask for host routes in response
	to version 2 queries.

	Trusted gateways would not work because a flag field was
	copied instead of merged.

	Responses to RIP-II queries did not provide the correct mask
	for host routes.

	RIP-II multicast could not be enabled by reconfiguration.

	When things were busy (i.e. BGP sucking down alot of routes),
	RIP and HELLO could request a negative timer interval which
	would cause a loop in the timer dispatch code.

	In some situations, RIP and HELLO could calculate the wrong
	mask for network routes learned via a subnetted interface
	which would prevent the route from being installed.


		These are the changes for the July 27, 1992 Alpha

General:

	Testing and debugging of dynamic interface support.  Still
	does not properly deal with mask changes.

EGP:

	EGP was forgetting that it had made a request for the
	generated default route and making multiple requests.  Which
	prevented the route from going away.


OSPF:
	
	Remember the last interface used for MC and don't change the
	default MC interface if it has not changed.

	The list of potential multipath routes were not being properly
	maintained. 

RIP:

	Receive and multicast support for RIP v2 (for ripquery too).
	Does not (yet) support domains, authentication or full
	subsumption rules.



	   These are the changes for the July 7, 1992 Alpha

General:

	Rewrite of Fletcher (ISO) checksum by Dennis Ferguson.  Put
	ISO and inet checksums in checksum.c with ISO checksum only
	complied when using OSPF or ISO.

	Changed if_withmyaddr() to recognize the broadcast address.
	This allows RIP and HELLO to recognize and reject routes the
	the broadcast address of the interface.

	Bugs in if_namematch() cause wildcard references to interfaces
	to fail.

	If "options nosend ;" is specified, task_send_packet() would
	return zero instead of the number of bytes sent.

	If the subnet mask on a P2P interface is not the natural mask
	of the interface and not a host mask (all ones), set
	int_subnetmask and int_subnet.  This is used by RIP and HELLO
	since they will only send subnet routes if the subnet mask of
	the interface matches the subnet mask of the route.

	If a P2P interface has a subnet, and the addresses on both
	sides of the interface are on that subnet, a summary subnet
	and network route are created.  These have a preference of 110
	(down interfaces preference changed to 120) so they won't
	override direct interfaces.

	Changed the functionality described in the above two
	paragraphs, the new description is:  If the subnet mask on a
	P2P interface is not a host mask and is not the natural mask,
	leave int_subnetmask set so RIP and HELLO can propagate subnet
	information.  IFS_SUBNET and int_subnet are not set, so only
	RIP and hello should notice this.

	Changed parse_adv_append() to pass a pointer to the list
	intead of passing the list and returning the new list.

	Remove the daemonize flag and add a TASKS_NODAEMON bit.

	Move parse_args() from main.c to parse.c.
	
	Rename parse_adv_propagate() to parse_adv_propagate_metric()
	and add parse_adv_propagate_preference().  Use when parsing
	import and export policy instead of inline code.

	Get rid of parse_import_list and parse_export_list side
	effects as well as several protocol dependent switch()
	statements in import/export parsing code.

	An SNMP GET for the default route when there is none would
	cause a core dump.

	Lots of bugs in handling the TSI allocation map.

	Kernel routes are now deleted as soon as they are overridden.
	Use only one protocol, kernel, instead of kernel and krt.
	Differentiate between remnant routes and static routes via
	RTS_NOADVISE and RTS_STATIC.

	rtbit_set() and rtbit_reset() would allow setting or clearing
	bits that were already set or cleared, resulting in invalid
	reference counts and routes that would never go away.

	
Dynamic Interfaces:
	
	When compiled with DYNAMIC_INTERFACES, the kernel interface
	location code is used (krt_ifread()) so gated notices
	interfaces coming and going.

	Changed int_proto_import[RTPROTO_MAX],
	int_proto_export[RTPROTO_MAX] and int_proto[RTPROTO_MAX] to be
	members of a structure int_ps[RTPROTO_MAX].  Changed interface
	specific policy to use these routines intead of
	<proto>_int_{im,ex}port.

	Target (RIP & HELLO) routines allocate and deallocate
	interfaces as necessary.

	Make int_lcladdr seperate from if_broadaddr and point it at the
	same address as int_addr on a non-P2P link.  Get rid of
	IF_LCLADDR() macro.

	Move if_entry chain pointers into if_info and modify macros
	appropriately.  Change most if_with*() routines to ifi_with*()
	routines that take an (if_info *) list so they will work with
	both the active interfaces and the list of configured
	addresses.

	The define sub-clause of the interfaces clause will add
	interfaces to a list of configured interfaces.  This will be
	used by the parser to prevent warnings for interfaces which
	are down.

	Seperate received routing socket messages by function (route,
	rtinfo, ifaddr, ifinfo) into different routines.  Test
	getkerninfo() version of krt_ifread().

	Protocol specific flags and metric are now in the protocol
	specific section of the if_entry.  The kernel interface metric
	is no longer used by the interface code, just by the protocols
	if they do not have a default.  Do not allow specification in
	the config file.

	Add optional interface list to static routes to constrain them
	to a specific set of interfaces.

	Change the config file syntax so that in the interface clause,
	"options" applies to global interface options and interface
	specific options are prefixed with "interface".  Add
	scaninterval to specifiy how often the interface is is
	scanned:

		interfaces {
			options scaninterval 15:00 ;
			interface slip passive ;
			define 150.138.100.1 broadcast netmask 255.255.255.0 ;
		} ;

BGP:

	Add support for BGP import aspaths.  Not yet tested.

HELLO:

	A test for correct packet size was reversed.


OSPF:

	Incorrect use of "nonbroadcast" on an OSPF interface
	definition could result in a core dump instead of an error
	message.

	The SPF algorithm was attempting to look up virtual links by
	address instead of router ID.

	Refine code that validates addresses on incoming packets as it
	prevented virtual links from working.

	Direct acks were not sent to the AllSPFRouters multicast
	address when they should be.

	A bug in the Deering multicast kernel modifications prevents
	specification of P2P interfaces by destination address.
	Instead of dumping core when this happens, send the packets
	directly instead of to the multicast address.

	Indicate interface name when tracing packets, when sending
	packets on a multicast capable P2P link, the specification of
	the local address may be ambiguous.

	When the backup seen event occurs for a neighbor, the defered
	event indication was not reset.  This event was made local to
	to ospf_rx_hello().

	Misc minor fixes from Rob.

	Another fix from Rob for an LSA being referenced after it was
	freed.

	Configuration parameters intended for virtual interfaces were
	being applied to the last non-virtual interface configured.
	Changed ospf_parse_virt_alloc() to return a (struct INTF *)
	and assigned this to ospf_INTF in the parser so the parameters
	would be set correctly.


RIP & HELLO:

	When a new interface appeared (actually when an interface that
	had gone down came back up), a target was recreated for it,
	but initial policy was not run on it so nothing would be
	announced.  The fix was to add a TARGETF_POLICY flag to
	indicate that policy had been run.  When
	{rip,hello}_target_list() is run from {rip,hello}_ifchange(),
	any targets without this bit are fed the results of an
	rthlist_active(AF_INET).

	Set the src field in the target structure to the *local*
	address of the interface instead of just the interface
	address.  This is basically only used for display and is more
	useful if it definitively defines the interface.

	Inet_mask_withif() was not properly using a valid subnetmask
	on a P2P link, so subnets would be mistaken for host routes.

	Modularize RIP a bit more by moving parts of rip_recv() into
	rip_recv_request() and rip_recv_pollentry().

	Add options for specification of metricin and metricout on the
	protocol interface clause.  Add the kernel interface metric to
	the incoming hop count only, and only if metricin is not
	specified (this is closer to both routed and the RFC1058).
	Metricin and metricout are specified as protocol metrics with
	a minimum of one hop count.

	
	   These are the changes for the May 14th Alpha

General:
	ULTRIX4_X was not one of the systems checked for having kernel
	rtentries not in mbufs.  Changed config.h to define
	ROUTES_NO_MBUFS.

	A sock2gated() was missing when printing an informational
	message in init_if().

	Use inet_mask_locate() instead of mask_locate() when looking
	up only inet routes.

	Delimited calls to tracef() in frequently called code with
	test for tracing being enabled where possible.

	When using getkerninfo() to read the kernel's routing table
	with alot of routes present, a large amount of memory was
	obtained via malloc() and the released with free() never to be
	used again (depending on malloc).  Added routines to use
	sbrk() for malloc() like calls and return it to the pagesize()
	free list to be broken into smaller structures.

	Removed messages about adding masks.

	Changed the radix tree to allocate internal and leaf nodes
	seperately.  This avoids a node copy on delete if the parent
	node of a leaf being deleted is not the one allocated with it.

	The number of different destinations (networks and hosts) was
	being improperly calculated (always added to, never deleted
	from).

	It was not possible to specify the local address of a P2P
	interface as the router ID.  It was also not possible to
	specify a secondary address on the loopback interface as the
	router ID.

	The initialization code for the internally generated default
	(generated when EGP and BGP peer relationships are working)
	was called before inet_init() resulting in null pointers for
	the default address and mask.

	Ignore the netmask on loopback interfaces for two reasons.
	These are just host routes, and it is not possible to properly
	determine the netmask of a secondary address.  Only install
	reject summary routes for the 127.0.0.1 net.

	Routes deleted during reconfiguration (static routes that are
	no longer in the configuration, or RIP/HELLO routes that are
	no longer permitted by policy for example) would cause a core
	dump as the flag was missing indicating that they should be
	retained.

	If a select bit is set, but there is no method specified to
	deal with it, turn off the bit.

	rt_insert() was not properly handling two routes with the same
	protocol so a route with a higher metric could become active.

	Always add REJECT routes, just don't install them in the
	kernel unless supported.

	Added -N flag to prevent daemonization when started from an
	/etc/inittab-like method and parent process ID is not 1.

	When an interface timeout is detected, don't delete the route
	to the interface, but set the preference so that an IGP route
	can override it and set RTS_NOADVISE so it is no longer
	advertized.  This allows the host to be reachable on that
	interface if the hardware is still working.

	Changed if_withsubnet() to support interfaces with overlapping
	masks.  Mask_locate() now always allocates the maximum size
	block, but trims the mask by shortening the mask field so
	generic mask functions can work.  This allows inet specific
	operations on the s_addr field to work as well.  Mask_locate()
	keeps the masks in order, they should be on the radix tree
	though.

	Interface down preference was incorrectly assigned to
	ifp->int_preference.

	Incorrect fix caused 127 routes to be added to the kernel only
	when the kernel *did not* support RTF_REJECT.

	Krt_rtread() was setting the announcment bit on the wrong
	route when an interface route existed when the kernel route
	was added.  Change krt_rtread() to delete any kernel routes
	which do not become the active routes when installed.  This
	results in kernel routes for interfaces not ending up in the
	table.  Also, delete any routes from the kernel that should
	not be installed because the active route has RTS_NOTINSTALL
	(or RTS_REJECT on systems where it is not supported).
	Restructure krt_rtread() so ioctl and routing socket versions
	share as much code as possible.

	Note that on the IBM 6611 version of gated, routes that exist
	in the kernel when gated is started will be deleted and
	readded.  This insures that multipath routes exist in the
	kernel that gated thinks are unipath.

	The EGP/BGP generated default was deleted prematurely.

	Allow "noinstall" option to allow systems without "reject" to
	add static aggregation routes which should not be installed in
	the kernel.  This will eventually be replaced by aggregation
	policy. 

	BGP and EGP were not properly dealing with gendefault.  Change
	rt_default_add() to do an rt_open() and rt_close().

	When opening a trace file that did not exist, the result
	structure from a stat() call was used anyway.

	
BGP:
	Cleaned up BGP packet tracing a bit.

	Don't delete a route that has already been deleted.

	Don't accept myself as a next hop.

	
EGP:
	A passive peer was considering Neighbor/Hello and Poll
	messages as reachability indications when the status
	indication was Down.  This resulted in the passive peer
	transitioning to the Up state with the first Neighbor/Hello
	message instead of waiting until the Active peer was in the Up
	state.

	Use IP_MAXHDRLEN instead of sizeof (struct ip) to allow for
	the potential of options.
	
	When sending updates larger than the specified egp packet size
	(8192 bye default) to two different neighbors, the kernel send
	buffer size was not increased for the second neighbor.
	Maintain a variable in the neighbor structure to remember what
	the send buffer was set to for this neighbor.

	EGP was not properly maintaining the linked list image of the
	update to be sent.  Changed the structures to use doubly
	linked lists and up pointers to simplify and optimize the code.

	EGP was not properly noticing new policy after
	reconfiguration.

	RFC904 does not call for resetting t2 (the Poll timer) upon
	entry to the Cease state, it is normall reset upon entry to
	the Idle state.  This can cause annoying messages about state
	machine botches.  So transitions to the Cease state from the
	Up or Down states will reset this timer.

	When running EGP on P2P interfaces, trace messages were wrong,
	and all routes would be ignored.

	EGP Would not delete routes to a neighbor on transition to
	Down state, only on transition to Cease or Idle state.

	When not using the gateway option make sure that the supplied
	gateway is on an attached network and is not one of our
	addresses.  If this test fails, reject the packet.

	
HELLO and RIP:

	Specifying sourcegateways would cause a coredump.

	Do not announce remote end of P2P interface to itself.  Out
	other interfaces announce with metric 2 since there is
	actually one hop to get to this host.

	Move check for routes to this interface address into
	protocols.

	When announcing a route from another protocol, do not listen
	to RIP or HELLO routes that have a metric greater than the
	lowest metric we announce into RIP or HELLO.  This prevents us
	from overridding the other route with our own echo when there
	is a router in parrallel with us.

	Flash updates should not occur within 5 seconds of a scheduled
	update.  Rework the timers so they hopefully work properly.

	HELLO was using a byte instead of a u_short for the TSI field,
	guess no-one ever uses it.

	
OSPF:
	Major cleanup of tracing and logging.

	Fix parser to recognize OSPF ASE metric as well as OSPF cost.

	Rename C source files (not header files) to remove _gated_
	from the name.

	Move export of routes into OSPF to ospf_rt.c from ospf_init.c.
	
	ASE Checksumsum was being handled properly when receiving a
	MaxAge ASE which we did not have.

	The SAME_INSTANCE macro needlessly did ntohs() before
	comparing two checksums.

	The Neighbor exchange counts were not being maintained
	correctly, preventing LSDBs from being freed.

	Do not scan the ack list for duplicate entries in the special
	case where the LSDB is known not to be on any Ack lists.

	Defer SPF calculations until after receiving several packets.

	Maintain the LSDB retransmission queues as a hash table to
	decrease search time when removing LSDBs from retransmission
	lists.

	Acks were being sent too infrequently (every five seconds).
	Send indirect (multicast) acks when there is a full packet or
	every second, whichever comes first.

	Don't scan free list after receiving an LS Update, only scan
	it every five seconds.

	The transit area for virtual links was set to the area ID
	instead of the area index causing core dumps.  Checks for
	invalid transit areas were not being performed properly.
	
	Rewrote support for Summarizing Network LSAs at area borders.
	Did not work with multiple area border routers.  SumNet LSAs
	are now flushed when they go away instead of being reorignated
	as LSInfinity.

	Add local addresses of all non-OSPF interfaces to the next hop
	list so they can be specified as stub networks.

	If two areas specified gated would complain that the backbone
	area should be specified last.

	Gated was not properly looking up the forwarding address of an
	ASE in a route and failing to add ASEs.

	Routes could be installed without one of the
	RTS_INTERIOR/RTS_EXTERIOR/RTS_HOSTROUTE flags set so it would
	not be located by rt_lookup() called from findforward().  This
	prevented ASEs with a forwarding address from being installed
	in the routing table.

	Secure ospf_monitor so it can only perform read-only
	functions.

	
SNMP:	

	SNMP could get into a state where task_connect was set, but
	TASKF_CONNECT was not, resulting in errors indicating there
	was no task_write for the socket.


	   These are the changes for the April 21st Alpha


General:

	Changed most logic errors to use assert() instead of printing
	a seperate message and calling task_quit().  You have to look
	at the code anyway...

Interfaces:

	Gated would try to sockfree() a null pointer if a P2P
	interface address changed.

	
Routing Table:

	With RT_N_MULTIPATH greater than one, but only one multipath
	in a route, rt_change() would not notice a next hop change.
	   
BGP:

	Would print a less than obvious diagnostic message when the
	specified interface for an internal peer was not the same as
	the interface used for the gateway option.

	When BGP configuration was specified, but BGP was disabled, a
	reconfiguration would cause a message about a duplicate group
	because it did not delete configured peers.  It also did not
	free policy.

	BGP would allow a holdtime greater than 65535 to be
	configured.


EGP:

	The packet size for some transmitted packets was not being
	calculated properly.

	Was not binding to the local address of a P2P interface.

	If the neighbors AS was not configured, the policy would not
	be re-evaluated when the neighbor`s AS was learned.

	When peering over a P2P network, polls for the network on my
	side of the interface would fail.  Changed the check for a
	valid polled network to check for the network of the local
	side if a P2P interface.  On non-P2P interfaces check the
	interface network first before looking on other interfaces.

	Was not handling send and receive packet lengths just right.

	Was not calculating the required send buffer size right in
	that it did not account for more than 255 networks per
	distance by allowing for another instance of the same
	distance.

	Was not printing all next hops if there were more than one.

	Was not correctly checking for overflow when building an
	update packet.

	Changed messages to give more info about routine calling them.

	A reachability check was erroneously being performed in the
	acquisition state while processing a Confirm event.

	During a t1 event, if the reachability check resulted in a
	down event, a poll would still be performed and t2 would be
	restarted.

	
OSPF:

	Add configuration language to allow configuration of stub
	hosts.  Fix MIB problems retrieving this information.

	On an NBMA network a non-eligble neighbor would not be able to
	install routes that were connected to other NBMA neighbors.

	Was not deleting the "default" multcast routes on shutdown.

	Packet checksums did not work properly when the authentication
	field was zero.  Changed the checksum procedure to use iovecs
	and inet_cksumv() to skip the authentication field.

	Changed authentication fields to an array of two 32 bit
	unsigned ints for faster copying and comparisons.

	ASEs were not being removed from the retransmission queue when
	deleted or overridden.

	When using monitor packets to display routes with multiple
	next hops, display all the next hops.

	When an interface route changed to a non-interface route, OSPF
	was not changing the RTS_NOTINSTALL|RTS_NOADVISE flags.

	Changed the ASE generation code to more efficient version
	based on code from Dennis Ferguson.

	Added checks to make sure that interfaces are defined for
	configured areas.  For the backbone an interface or virtual
	interface.

	In a certain topology OSPF would prefer ASEs over inter-area
	routes.

	   
RIP:

	Tracing code was complaining about reserved fields not being
	zero even when `nocheckzero' was specified.

	Was only responding to RIP Requests if RIPF_SUPPLY was set.
	Now we will only respond if we have a target for the source
	and TARGETF_SUPPLY is set indicating we are allowed to send
	updates.

	Don't subsume routes to P2P interfaces.

	When tracing give an indication for packets that were not
	transmitted do to a sendmsg error.

	Requests were not being checked for must be zero fields, only
	Responses.


RIP & HELLO:

	When trustedgateways or sourcegateways were specified in the
	config file, gw_timer_max was not being set so routes would
	time out as soon as rt_expire() was run.

	If supplying to a P2P interface and it is also specified in a
	`sourcegateways' clause, duplicate packets would be sent.
	Added a check when processing sourcegateways to check for
	existing interfaces.


SNMP:

	Use "gated" instead task_progname when registering a name with
	SMUX.


	   These are the changes for the April 12th Alpha

Routing table:

	Bugs in new Flash update handling was improved.  The routing
	table is now always consistent in that the rth_changes
	structure always points to the status of the active route the
	last time it was on the list.

	In rth_locate(), locate_rth was not being reset if any host
	bits were not zero.  This resulted in rt_free() calling
	rth_remove() which resulted in a core dump.

	Routes coming from the routing socket do not always have the host bits
	cleared.

	Krt_change() did not properly deal with a route with the same
	gateway but different flags.  Current BSD 4.3 Reno and latter
	systems do not allow this although future systems might.

	The code that reads routing socket messages was cleaned up.
	Some Support was added for recognizing and tracing new
	interface status change messages.  Bounds checking was added
	on routing socket messages.  One routine is used to parse
	messages relating to the routing table instead of one method
	in krt_rtread() and one in krt_recv().

	During reconfiguration, static routes are only deleted when
	necessary.  If no changes are required, none are made. If
	changes can be made, rt_change() is used.

	rtbit_reset_all() was assuming a maximum length of 4 for a TSI
	field and overwriting garbage on the stack with OSPF (which
	now uses 5) when trying to change and reset the TSI field.
	It should have been calling rttsi_reset().

Tracing and running:

	The umask was set to 022 to prevent the creation of world
	writable files.

	The `replace' option on the `tracefile' keyword was applied
	during reconfiguration which would cause the current trace
	file to be overwritten.

	Features were added to allow the specification the number and
	maximum size of the gated log files.  When a log file fills up
	it is renamed and a new file is opened.  See the man page for
	details.

	Locking on the PID file is now preformed to insure that only
	one copy of gated runs at a time.  The flock() call is used
	although an emulation using lockf() is available.

Tasks:

	Gated would loop infinitely when receiving an
	E{HOST,NET}UNREACHABLE while sending packets.  The retry limit
	is now set to 5.

	The sbrk() call was changed to always ask for a multiple of
	the system page size.  Some Unix mallocs like to maintain page
	alignment.

	Support for POSIX signals.
	
BGP:
	Lots of bugs in the BGP MIB (now that it can be tested).  BGP
	trap support was added.

	Several BGP bugs were fixed.

	Several BGP/OSPF bugs were fixed.
	
Redirects:
	
	The redirect support code was restructured a bit to seperate
	it from rt_table.c.  It is still initialized by a call to
	redirect_init() from rt_table_init(), but that is the extend
	of the direct interaction.  The main redirect handling was not
	changed at all, but changes such as disabling redirects at any
	point will cause all redirects to be deleted from the kernel.

RIP:

	RIP was not defaulting to on if not specified in the
	configuration file.

	RIP/HELLO would not send packets to an P2P interface if it was
	marked as passive, target_build() was applying a check meant
	for NBMA interfaces.

SNMP:

	Core dumps when sending traps were fixed.

	Three consecutive SIGHUP signals in a row would cause SNMP to
	go into an infinite loop.
	
OSPF:

	OSPF was ignoring the NBMA `poll-interval' parameter and not
	correctly polling when there was more than one peer.

	MIB requests for Network Range variables would cause core
	dumps.

	OSPF was not handling the routing table when creating ASEs.
	It would rtbit_reset() on routes that were still on the queue
	which resulted in core dumps.  This code really needs a major
	rewrite as it currently does linear searches of a queue that
	could potentially hold thousands of routes.

	OSPF would not compile on a machine supporting Multicast and
	with a host byte order different from the network byte order.
	On these machines, htonl is not a macro and so it can not be
	used in a switch.

	On systems with the Deering IP multicasting mods it is not
	possible to send to a multicast address unless one of the
	following routes exists in the unicast routing table to
	indicate a default interface for the group being addresses: A
	route for the specific group, a route for 224.0.0.0, or a
	default route.  This applies even if the IP_MULTICAST_IF ioctl
	is used to specify an interface.  As a workaround, OSPF will
	install a route to each of it's multicast groups (224.0.0.5,
	224.0.0.6) pointing at the loopback interface.  Since we do
	specify an interface, these routes will never get used so it
	does not matter that they point at an interface that does not
	support mulitcasting.

	OSPF was not properly calculating the checksum when it made
	changes to an ASE it originated.

	Had some byte order problems tracing packets.

	If the authentication type indicated that no authentication
	was in use, authentication field was improperly cleared before
	the checksum was calculated.

	On systems without multicast support additional checks were
	needed to make sure that broadcast interfaces were not
	configured.  Also, some checks for other interface types were
	incorrectly inside code that was only compiled on systems with
	multicast support.

Other:	

	The dynamic interfaces development code (which does not yet
	work) is now conditionally compiled with DYNAMIC_INTERFACES.
	Ditto for ROUTE_AGGREGATION.

	The PROTO_FUNCx macros were renamed to __PFx and only apply to
	the argument list.  This allows tags and other methods of
	locating specific functions to work properly.





	   These are the changes for the March 27th Alpha

OSPF did not ntohs() LS_CKS() which resulted in incorrect checksums being 
reported on little??? endian machines.

OSPF was not flooding routing table changes.

OSPF did not set is_trans_area nor nbr_addr which prevented virtual links
from working properly.

Much work was done on tag and AS path support.

AS and ASout were renamed to localAS and peerAS respectivley.

The daemonization code run at init time was rewritten according to the 
guidelines in "Unix Network Programming" by W. Richard Stevens.  The 
SIGCHLD handler was also rewritten so it did not report ECHILD errors.  
On some systems they occur during startup.

Krt_init was using task_maxpacket before it was set.  This prevented 
reads on the routing socket from succeding, resulting in excessive CPU 
overhead.

To avoid conflicts with IDPR, NOERROR and ERROR were renamed to 
EGP_NOERROR and EGP_ERROR.

OSPF would not install ASEs if the specified forwarding address was on a 
subnetted network we were not connected to.  The forwarding cache code 
was completely rewritten and optimized.

Specifying `tracefile' in the configuration file did not work properly.

The code to disable redirects when routing protocols were running and the 
code that indicated that a routing protocol was active on an interface 
were rewritten to work properly during reconfiguration.

Several data fields from the rt_entry were moved into the gw_entry field 
to save memory.  The protocols were rewritten to have at least one 
gw_entry for each routing protocol used.

The routine rt_locate was changed to use a mask, rt_locate_gw was changed 
to remove the protocol, which is in the gw_entry.  They were also changed 
to return deleted routes, and the protocols were changed to allow for it.

Converted to IP Forwarding table MIB version 5, which did not seem to 
introduce any technical changes, only editorial.

The parser incorrectly required two semi-colons after the 'options' field 
of the 'interface' clause.

A bug in if_namematch prevented a wildcard match on a an interface name 
with no number.

Read and writes will now retry on EHOSTUNREACH and ENETUNREACH.

Yet another rewrite of code that installs OSPF routes in the routing 
table to fix some inconsistencies.

OSPF routes were not properly being added with "unnumbered" point to 
point links.

The Target Specific Information (TSI) blocks were not being freed.

RIP and HELLO were incorrectly refering to an rt_entry after it had been 
freed.

RIP and HELLO were supplying an netmask when installing host routes.

RIP was not correctly responding to a QUERY because it was not setting 
the RESPONSE code in any packets except the last one.

EGP was not correctly calculating the gateway based on the polled network. 

RIP, HELLO and OSPF were modified so they would not flash information 
about a route that had changed if there was not change in metric or 
gateway.

Code was added to provide information on what has changed about the 
active route.  This code still needs developement because it does not 
always provide the needed information.  Information available includes 
the metric, next hop/ifp and AS path.

Rt_add and all callers were changed to provide all information in a 
structure.  The rt_flag field was removed, all necessary flags where 
moved into rt_state and use of the kernel flags was restricted to krt.c 
(and for now if.c).

The generation and matching of inet masks was generalized and optimized.
Tenative support for proposed A# and C# networks.  The martian list was 
improved and corrected.  Classing and martian matching were optimized and 
merged with mask support.

EGP was not correctly predicting the size of an update packet.  This 
check is still not correct when there are more than 255 destinations for 
one gateway.

EGP would switch to a new gateway if an update was received with a metric 
of 255 (which means unreachable).

Due to a typo, OSPF was incorrectly generating Summary Nets LSAs when 
processing ASE LSAs on an Area Border Router.

Support for TR_CONFIG was removed.  This option recreated portions of the 
configuration file based on data structures creating during parsing.  
Support for this option was not complete and the effort to complete it 
was judged not worth the benefit.

The RTS_NOADVISE flag was not being set for kernel and redirect routes.

Rt_change did not correctly handle the addition of an additional next 
hop.  This is only significant when supporting multipath routes.

Rthlist_active did not return information about all families when called 
with a protocol family of AF_UNSPEC.  This resulted in protocols not 
finding interface routes when rthlist_active was used to get route list 
for task_newpolicy.

EGP and BGP were modified to use a slightly lower task priority.  This 
ensures that any pending IGP packets are processed before EGP packets.

When using the routing socket, krt_recv did not reset the installed flag 
on routes overridden by an RTM_CHANGE message.  The ADD/CHANGE/DELETE 
code here still needs to be rewritten.

Parser support for import and export rules was cleaned up.  Specification 
of illogical and unsupportable rules was prevented.

Support for AS paths was generalized and is automatically included when 
any protocol that *may* use AS paths is included (currently OSPF and 
BGP).  OSPF tag support was merged with AS path support.  Since AS paths 
are generated for all protocols, the source of routes in an export 
statement can specify any protocol in association with an AS path ("all" 
should be allowed, but is not yet).

OSPF tag support was generalized as other protocols may have a tag in the 
future.  Support for selecting routes based on type was removed with the 
idea that tags should be used instead.  Generation of an automatic (AS 
path) tag is the default.

The adv_count field was removed from adv_entry and the union was
changed from an array to a scalar.  Adv_compress() was removed.
The overhead of maintaining this code was judged to be too much
effort, and the gain was questionable.

The OSPF configuration file parameter "routerpriority" was renamed to
"priority" (which as already defined as an alias).  This is for future
compatibility with the IS-IS protocol.

The development sources of the Wisconson IS-IS protocol were merged.
This code is not operational, it is still under development.

The routing socket code does a exponential backoff when it gets an
error.  The problem was it was changing the wrong timer...

Added RTS_ONLIST flag to prevent a rt_head from being added to a
change list twice.  When RTS_ONLIST is set, an rt_head is not freed
until after a flash update.  The older method of attempting to deal
with this (RTLIST_DELETE macro) is removed.  Changes routes are
accumlated and a flash update will happen only after all input packets
or timers are processed to reduce overhead when things are busy.

Rt_redirect would go into an infinite loop when receiving a second
redirect for the same destination.

All protocols (except snmp) now read up to ten packets at a time.
SNMP still only reads one to be non-intrusive.  ICMP reads up to a
hundred.  All of these sockets are now non-blocking.

Hello was not opening and closing the routing table when evaluating
policy changes.

Rt_insert now knows about AS paths and will use them to break a
preference tie.

#Local variables:
#eval:	(setq fill-prefix "	")
#eval:	(setq fill-column 72)
#end:

#
# ------------------------------------------------------------------------
# 
# 	GateD, Release 3.5
# 
# 	Copyright (c) 1990,1991,1992,1993,1994,1995 by Cornell University.
# 	    All rights reserved.
# 
# 	THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY
# 	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
# 	LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# 	AND FITNESS FOR A PARTICULAR PURPOSE.
# 
# 	Royalty-free licenses to redistribute GateD Release
# 	3 in whole or in part may be obtained by writing to:
# 
# 	    GateDaemon Project
# 	    Information Technologies/Network Resources
# 	    200 CCC
# 	    Cornell University
# 	    Ithaca, NY  14853-2601  USA
# 
# 	GateD is based on Kirton's EGP, UC Berkeley's routing
# 	daemon	 (routed), and DCN's HELLO routing Protocol.
# 	Development of GateD has been supported in part by the
# 	National Science Foundation.
# 
# 	Please forward bug fixes, enhancements and questions to the
# 	gated mailing list: gated-people@gated.cornell.edu.
# 
# ------------------------------------------------------------------------
# 
#       Portions of this software may fall under the following
#       copyrights:
# 
# 	Copyright (c) 1988 Regents of the University of California.
# 	All rights reserved.
# 
# 	Redistribution and use in source and binary forms are
# 	permitted provided that the above copyright notice and
# 	this paragraph are duplicated in all such forms and that
# 	any documentation, advertising materials, and other
# 	materials related to such distribution and use
# 	acknowledge that the software was developed by the
# 	University of California, Berkeley.  The name of the
# 	University may not be used to endorse or promote
# 	products derived from this software without specific
# 	prior written permission.  THIS SOFTWARE IS PROVIDED
# 	``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
# 	INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# 	MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
