Home | History | Annotate | only in /src/sbin/routed
History log of /src/sbin/routed
RevisionDateAuthorComments
 1.27 03-Jun-2023  lukem bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.26 13-Oct-2019  mrg introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
 1.25 25-Aug-2011  joerg branches: 1.25.42;
main.c uses non-literal format strings.
 1.24 14-Aug-2011  christos document non-literal strings
 1.23 28-May-2007  tls Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.22 06-Jun-1999  thorpej Use pidfile(3).
 1.21 23-Feb-1999  christos Oops remove WARNS=1
 1.20 23-Feb-1999  christos Resolve conflicts.
 1.19 26-Aug-1998  christos Avoid interraction between pppd and routed, by trying to discover new
interfaces every time there is a new route, irrespective of timeout period.
 1.18 11-Oct-1997  mycroft Use bsd.subdir.mk as appropriate.
 1.17 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.16 10-Aug-1996  thorpej Add a manual page link from routed(8) to rdisc(8) as suggested by
Giles Lean <giles@nemeton.com.au> on the tech-net@NetBSD.ORG mailing
list. The rationale for this is that folks may be used to rdisc(8)
or in.rdisc(8) on other systems, and may not realize that NetBSD
implements ICMP Router Discovery in the routed(8) program.
 1.15 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.14 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.13 31-May-1995  ragge Took away use of vax inline functions. Didn't work anyway.
 1.12 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.11 22-Dec-1994  cgd specify man pages the new way.
 1.10 15-May-1994  cgd don't do query and trace
 1.9 13-May-1994  mycroft Clean up import.
 1.8 28-Jan-1994  cgd don't need -lutil
 1.7 30-Dec-1993  cgd Undo that last change. It was 100%, beyond a doubt, completely bogus.
afswitch and af_max were still used, but since they was declared 'common'
by virtue of their declaration in af.h, the symbols were defined at link-
time, and their contents were considered BSS -- init to zero.
Now, you and i know that jumping to zero causes a core dump...
Therefore: af.c has been resurrected, so the procedure pointers actually
point to procedures, tables.c has had it's change nuked, and af.h
has been changed so afswitch and af_max are declared as 'extern'.
It's obvious that that 'fix' wasn't even tested.
 1.6 18-Dec-1993  mycroft Move inet_default into tables.c, and remove all of af.c, as it is no longer
used.
 1.5 28-Oct-1993  cgd remove query and trace from subdir lists; they're for debugging only.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.6 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.25.42.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.13 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.12 24-Jul-1995  ws RIP address families are still 2 bytes
 1.11 13-Jul-1995  cgd fix a stupid bug; wrong size was being used for sin_len.
 1.10 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.9 24-May-1995  mycroft Format police.
 1.8 24-May-1995  christos Fix bug in af_format where the formatted address was returned in the same
static buffer. When af_format is used more than once in the same printf
statement, the second call will overwrite the first. Changed af_format to
take a buffer and the buffer size where to place the formatted string.
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.8 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 13-May-1994  mycroft Clean up import.
 1.5 30-Dec-1993  cgd Undo that last change. It was 100%, beyond a doubt, completely bogus.
afswitch and af_max were still used, but since they was declared 'common'
by virtue of their declaration in af.h, the symbols were defined at link-
time, and their contents were considered BSS -- init to zero.
Now, you and i know that jumping to zero causes a core dump...
Therefore: af.c has been resurrected, so the procedure pointers actually
point to procedures, tables.c has had it's change nuked, and af.h
has been changed so afswitch and af_max are declared as 'extern'.
It's obvious that that 'fix' wasn't even tested.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.28 02-Oct-2017  maya unifdef sgi. NFCI
 1.27 12-Feb-2012  wiz Remove duplicate RS_LOCAL. From cppcheck via Henning Petersen in PR 46000.
 1.26 29-Aug-2011  joerg branches: 1.26.2;
Use __dead
 1.25 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.24 27-Jun-2005  christos Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
 1.23 21-Apr-2004  christos constification lossage (hi gimpy)
 1.22 30-Nov-2002  christos sync with routed 2.27
 1.21 02-Nov-2001  lukem fix -Wshadow warnings
 1.20 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.19 15-Jan-2001  itojun specify interface by using interface index (set/getsockopt with 0.0.0.0/8).
 1.18 23-Feb-1999  christos Resolve conflicts.
 1.17 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.16 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.15 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.14 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.13 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.12 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.11 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.10 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.9 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.8 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.7 23-Sep-1994  mycroft Remove some more uses of obsolete functions.
 1.6 13-May-1994  mycroft Clean up import.
 1.5 13-Apr-1994  cgd light comment change
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.26.2.1 17-Apr-2012  yamt sync with head
 1.31 02-Oct-2017  maya unifdef sgi. NFCI
 1.30 24-Jun-2012  kardel PR/44647: commit fix proposed by Takahiro HAYASHI
verified to be working in -current and also helps NetBSD-6 BETA2
 1.29 13-Oct-2010  martin branches: 1.29.6; 1.29.8;
Memcpy into local variable to ensure proper alignement.
Fixes PR port-sparc64/43965.
 1.28 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.27 28-Dec-2008  christos fix printf formats.
 1.26 14-Aug-2007  dyoung branches: 1.26.10; 1.26.16; 1.26.20;
Don't nul-terminate the interface name in a sockaddr_dl that is
part of an ifa_msghdr returned by sysctl(3), because that could
overwrite the ifam_len field of the following ifa_msgher. Instead,
copy the interface name out of the sockaddr_dl, and then nul-terminate.
Fixes the bug reported by Frank Kardel on current-users@. Thanks
Frank for reporting, and for testing the fix.
 1.25 17-Mar-2006  christos Coverity CID 2671: Fix use of ifp after free.
 1.24 30-Nov-2002  christos sync with routed 2.27
 1.23 02-Nov-2001  lukem fix -Wshadow warnings
 1.22 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.21 15-Jan-2001  itojun specify interface by using interface index (set/getsockopt with 0.0.0.0/8).
 1.20 11-Jun-2000  christos Revert 1.18 -> 1.19; causes infinite loops on machines that use ppp and
do active routing.
 1.19 02-Mar-2000  christos branches: 1.19.2;
remove the once hack; vjs says it is not necessary with the monotonic
time kludge. We'll see.
 1.18 19-Nov-1999  bouyer Ignore RTM_OIFINFO messages (send by a COMPAT_14 kernel).
 1.17 23-Feb-1999  christos branches: 1.17.6;
Resolve conflicts.
 1.16 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.15 26-Aug-1998  christos Avoid interraction between pppd and routed, by trying to discover new
interfaces every time there is a new route, irrespective of timeout period.
 1.14 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.13 15-Sep-1997  lukem use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.12 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.11 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.10 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.9 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.8 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 23-Sep-1994  mycroft Remove some more uses of obsolete functions.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.26.20.1 16-Aug-2010  matt Change to new route message sematics
 1.26.16.1 21-Nov-2010  riz Pull up following revision(s) (requested by martin in ticket #1460):
sbin/routed/if.c: revision 1.29
Memcpy into local variable to ensure proper alignement.
Fixes PR port-sparc64/43965.
 1.26.10.1 17-Jan-2009  mjf Sync with HEAD.
 1.29.8.1 02-Jul-2012  jdc Pull up revision 1.30 (requested by kardel in ticket #376).

PR/44647: commit fix proposed by Takahiro HAYASHI
verified to be working in -current and also helps NetBSD-6 BETA2
 1.29.6.1 30-Oct-2012  yamt sync with head
 1.10 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.9 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.8 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.7 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.6 06-Aug-1994  mycroft Fix `maskof' function which was returning `netof', per Brad Parker.
 1.5 13-May-1994  mycroft branches: 1.5.2;
Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.2.1 06-Aug-1994  mycroft update from trunk
 1.31 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.30 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.29 01-Dec-2002  agc Fix compilation problems on non-i386.
 1.28 30-Nov-2002  christos sync with routed 2.27
 1.27 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.26 02-Mar-2000  christos add a comment on about how tracing is secured, but still keep it disabled.
 1.25 23-Feb-1999  christos Resolve conflicts.
 1.24 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.23 24-Oct-1998  christos Disable and log RIP_TRACEON and RIP_TRACEOFF. They are insecure.
 1.22 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.21 15-Sep-1997  lukem branches: 1.21.2;
use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.20 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.19 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.18 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.17 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.16 13-Jul-1995  christos Fix bugs cgd pointed out.
 1.15 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.14 28-May-1995  jtc <sys/errno.h> -> <errno.h>
<sys/signal.h> -> <signal.h>
<sys/syslog.h> -> <syslog.h>
 1.13 24-May-1995  mycroft s/an active/a passive/
 1.12 24-May-1995  christos Fix bug in af_format where the formatted address was returned in the same
static buffer. When af_format is used more than once in the same printf
statement, the second call will overwrite the first. Changed af_format to
take a buffer and the buffer size where to place the formatted string.
 1.11 24-Apr-1995  cgd fix arguments to tracing functions and/or cast, to avoid warnings.
 1.10 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.9 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.8 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.7 23-Sep-1994  mycroft Remove some more uses of obsolete functions.
 1.6 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21.2.1 25-Oct-1998  cgd pull up rev 1.23 from trunk (christos)
 1.9 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.8 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 13-May-1994  mycroft Clean up import.
 1.5 11-Dec-1993  cgd fix from Brad Parker <brad@fcr.com> to curb routed inflation when
using MULTICAST. it wasn't properly ignoring the new interface flags.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.43 07-Apr-2022  andvar fix various typos in comments.
 1.42 02-Oct-2017  maya unifdef sgi. NFCI
 1.41 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.40 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.39 06-Jul-2004  wiz branches: 1.39.26; 1.39.30;
usage: -F was missing the /mask part. Based on PR 26063
by Kouichirou Hiratsuka.
 1.38 17-May-2004  wiz Remove unimplemented and undescribed -p option from usage and man page
SYNOPSIS. Noted by Jeff Ito.
 1.37 13-May-2004  wiz Remove option letter from getopt string, since it does not
have a case handler below. From aaron@openbsd.
 1.36 27-Mar-2004  christos From Vernon Schryver:

Wolfgang Solfrank has explained the problem with router discovery
in `routed` in a way I can understand.

Let's assume that the configured preference of the interface is 5.
This gets converted to 0x80000005 through the use of the UNSIGN_PREF
macro. Later on, this value gets put into the PREF macro, which
compares it against the interface metric(s) (let's assume those
values to be 0 for now). Of course the 0x80000005, cast to int,
is much less than 0, so the clamping rule is triggered, which
gives us a value of 1. This is then converted via SIGN_PREF into
0x80000001 and put into the message. Certainly, this isn't what
was intended.
 1.35 14-Nov-2003  enami Initialize an uninitialized variable.
 1.34 06-Sep-2003  itojun use arc4random
 1.33 13-Aug-2003  itojun avoid FD_SET overrun. from openbsd
 1.32 21-Apr-2003  itojun strcpy/sprintf cleanup. from openbsd
 1.31 30-Nov-2002  christos sync with routed 2.27
 1.30 02-Nov-2001  lukem branches: 1.30.2;
fix -Wshadow warnings
 1.29 24-Sep-2001  wiz va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
 1.28 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.27 15-Jan-2001  itojun specify interface by using interface index (set/getsockopt with 0.0.0.0/8).
 1.26 10-Jan-2001  lukem deprecate LOG_ODELAY; it's the default
 1.25 10-Oct-2000  is Format string cleanups by Bill Sommerfeld.
 1.24 02-Mar-2000  christos branches: 1.24.4;
add a usec_fudge to make sure that time increases monotonically.
printf format changes.
 1.23 06-Jun-1999  thorpej Use pidfile(3).
 1.22 25-Feb-1999  ross branches: 1.22.2;
LP64 tweak in printf(3) instance
 1.21 23-Feb-1999  christos Resolve conflicts.
 1.20 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.19 06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.18 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.17 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.16 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.15 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.14 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.13 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.12 28-May-1995  jtc <sys/errno.h> -> <errno.h>
<sys/signal.h> -> <signal.h>
<sys/syslog.h> -> <syslog.h>
 1.11 23-Mar-1995  mycroft Fix typo in previous.
 1.10 21-Mar-1995  mycroft Use POSIX signals.
 1.9 21-Mar-1995  mycroft Fix typo.
 1.8 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.22.2.1 10-Oct-2000  he Pull up revision 1.25 (requested by is):
Format string cleanup.
 1.24.4.2 07-Apr-2004  jmc Pullup patch (requested by ws in ticket #131)

Fix invalid cast wrt router discovery.
 1.24.4.1 18-Oct-2000  tv Pullup sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.30.2.1 01-Apr-2004  jmc Pullup patch (requested by ws in ticket #1642)

Fix invalid cast wrt router discovery.
 1.39.30.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.39.26.1 28-Sep-2008  mjf Sync with HEAD.
 1.2 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.1 03-Feb-1997  christos branches: 1.1.1;
Initial revision
 1.1.1.1 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.25 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.24 21-Mar-2006  christos Coverity CID 2742: Avoid NULL deref.
 1.23 18-Mar-2006  christos Coverity CID 1079: Possible NULL deref.
 1.22 30-Nov-2002  christos sync with routed 2.27
 1.21 02-Nov-2001  lukem fix -Wshadow warnings
 1.20 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.19 15-Jan-2001  itojun specify interface by using interface index (set/getsockopt with 0.0.0.0/8).
 1.18 20-Jul-2000  thorpej In walk_supply(), test for IS_PASSIVE in ifp->int_state, not
ifp->int_if_flags (IFF_* bits).
 1.17 23-Feb-1999  christos branches: 1.17.10;
Resolve conflicts.
 1.16 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.15 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.14 15-Sep-1997  lukem use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.13 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.12 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.11 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.10 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.9 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.8 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.7 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.6 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17.10.1 20-Jul-2000  thorpej Pull up rev. 1.18:
In walk_supply(), test for IS_PASSIVE in ifp->int_state, not
ifp->int_if_flags (IFF_* bits).
 1.26 16-Jan-2012  christos PR/45842: Henning Petersen: compare fgets with NULL not 0
 1.25 24-May-2011  joerg branches: 1.25.4;
Use bitwise operators, logical and with a constant doesn't make sense
 1.24 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.23 18-Mar-2006  christos Coverity CID 2307: Possible memory leak.
 1.22 18-Mar-2006  christos Coverity CID 2306: Possible memory leak.
 1.21 18-Mar-2006  christos Coverity CID 1080: Possible NULL deref.
 1.20 03-Jul-2003  itojun strcat -> strlcat
 1.19 21-Apr-2003  itojun strcpy/sprintf cleanup. from openbsd
 1.18 15-Apr-2003  itojun use snprintf. there are more...
 1.17 30-Nov-2002  christos sync with routed 2.27
 1.16 08-Aug-2002  itojun bitmask operation mistake audit (s/&&/&/). from openbsd
 1.15 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.14 21-Jul-2000  thorpej Make sure IS_PASSIVE gets set on a parm's int_state when the
passive option is used in an if=xxx clause.
 1.13 23-Feb-1999  christos branches: 1.13.10;
Resolve conflicts.
 1.12 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.11 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.10 30-Mar-1998  mrg use static int, not just static
 1.9 04-Feb-1998  christos y2k fixes: use strptime...
 1.8 19-Sep-1997  christos Fix uninitialized variable warning.
 1.7 15-Sep-1997  lukem use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.6 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.5 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.4 29-Jan-1997  ws Shifting by 32 on a 32-bit machine is undefined
(and in fact -1 << 32 results in -1 on e.g. x86)
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.5 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.4 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.13.10.1 21-Jul-2000  thorpej Pull up rev. 1.14:
Make sure IS_PASSIVE gets set on a parm's int_state when the
passive option is used in an if=xxx clause.
 1.25.4.1 17-Apr-2012  yamt sync with head
 1.11 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.10 23-Feb-1999  christos Resolve conflicts.
 1.9 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.8 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.7 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.6 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.5 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14 05-Dec-2021  msaitoh s/prefering/preferring/ in comment.
 1.13 25-Feb-2006  wiz Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
 1.12 06-Dec-2002  thorpej Avoid strict alias warnings.
 1.11 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.10 02-Mar-2000  christos add an unsigned cast; looks safe and innocent, but it might not be...
 1.9 22-Mar-1999  christos Revert cast to (int) that caused core-dumps.
 1.8 23-Feb-1999  christos Resolve conflicts.
 1.7 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.6 16-Sep-1997  lukem If One splits a line for cosmetic reasons, One should ensure that the
preceeding line has a \ if it's part of a #define...
 1.5 15-Sep-1997  lukem use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.4 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.3 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.7 27-Feb-2025  rillig routed: remove extra semicolon at the end of a function-like macro

No binary change.
 1.6 05-Feb-2005  xtraeme branches: 1.6.104;
Kill __P().
 1.5 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.4 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.3 16-Oct-1996  perry RCSid Police
 1.2 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.1 24-Sep-1996  christos branches: 1.1.1;
Initial revision
 1.1.1.2 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.1 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.6.104.1 02-Aug-2025  perseant Sync with HEAD
 1.17 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.16 18-Mar-2006  christos Coverity CID 2432: Dereference before NULL check.
 1.15 27-Mar-2004  christos From Vernon Schryver:

Wolfgang Solfrank has explained the problem with router discovery
in `routed` in a way I can understand.

Let's assume that the configured preference of the interface is 5.
This gets converted to 0x80000005 through the use of the UNSIGN_PREF
macro. Later on, this value gets put into the PREF macro, which
compares it against the interface metric(s) (let's assume those
values to be 0 for now). Of course the 0x80000005, cast to int,
is much less than 0, so the clamping rule is triggered, which
gives us a value of 1. This is then converted via SIGN_PREF into
0x80000001 and put into the message. Certainly, this isn't what
was intended.
 1.14 30-Nov-2002  christos sync with routed 2.27
 1.13 02-Nov-2001  lukem branches: 1.13.2;
fix -Wshadow warnings
 1.12 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.11 15-Jan-2001  itojun specify interface by using interface index (set/getsockopt with 0.0.0.0/8).
 1.10 02-Mar-2000  christos branches: 1.10.4;
protability cast.
 1.9 23-Feb-1999  christos Resolve conflicts.
 1.8 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.7 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.6 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.5 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.4 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.3 10-Aug-1996  mycroft Make sure to fill in the whole sockaddr_in when sending a discovery packet.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.5 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.4 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.10.4.1 07-Apr-2004  jmc Pullup patch (requested by ws in ticket #131)

Fix invalid cast wrt router discovery.
 1.13.2.1 01-Apr-2004  jmc Pullup patch (requested by ws in ticket #1642)

Fix invalid cast wrt router discovery.
 1.45 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.44 17-May-2004  wiz Remove unimplemented and undescribed -p option from usage and man page
SYNOPSIS. Noted by Jeff Ito.
 1.43 27-Mar-2004  christos From Vernon Schryver:

Wolfgang Solfrank has explained the problem with router discovery
in `routed` in a way I can understand.

Let's assume that the configured preference of the interface is 5.
This gets converted to 0x80000005 through the use of the UNSIGN_PREF
macro. Later on, this value gets put into the PREF macro, which
compares it against the interface metric(s) (let's assume those
values to be 0 for now). Of course the 0x80000005, cast to int,
is much less than 0, so the clamping rule is triggered, which
gives us a value of 1. This is then converted via SIGN_PREF into
0x80000001 and put into the message. Certainly, this isn't what
was intended.
 1.42 07-Sep-2003  wiz Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
 1.41 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.40 18-Dec-2002  wiz Sort sections, new sentences begin on new lines, add a missing line,
fix a typo.
 1.39 30-Nov-2002  christos sync with routed 2.27
 1.38 03-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.37 12-May-2002  wiz branches: 1.37.2;
Spelling fixes, from Sergey Svishchev in kern/16650.
 1.36 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.35 21-Jan-2002  wiz Use mdoc macros instead of man ones.
 1.34 16-Nov-2001  wiz Punctuation fix, sort sections, lose a .Pp.
 1.33 01-Oct-2001  kleink "kernel switch ipforwarding" -> "sysctl net.inet.ip.forwarding".
 1.32 05-Jun-2001  wiz Drop arguments of .Os.
 1.31 06-May-2001  wiz Improve usage of `comprise' according to Webster and misc/10893
by Jim Bernard.
 1.30 03-Apr-2001  wiz Don't xref gated(8) and htable(8), which we don't have.
 1.29 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.28 07-Nov-2000  lukem fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.27 05-Oct-2000  ad insure -> ensure
 1.26 05-Jul-2000  msaitoh remove extra period in SEE ALL section
 1.25 02-Mar-2000  christos branches: 1.25.4;
typos and clarifications
 1.24 23-Feb-1999  christos Resolve conflicts.
 1.23 13-Nov-1998  abs Fix typo 'with routing loop' to 'with a routing loop'
 1.22 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.21 21-Oct-1998  lukem spell daemon correctly in the opening paragraph...
 1.20 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.19 29-Apr-1998  fair fix bad .Xr references
 1.18 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.17 11-Nov-1997  mrg add missing .Nm sections.
 1.16 15-Sep-1997  lukem branches: 1.16.2;
* cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.15 26-Jun-1997  kleink Fix formatting directives; from SAITOH Masanobu <msaitoh@spa.is.uec.ac.jp>
in PR misc/3795.
 1.14 25-Mar-1997  perry fix 3128 from SAITOH Masanobu.
this consisted of nuking a duplicated paragraph; I did it slightly
differently than suggested.
 1.13 08-Mar-1997  mouse alternate -> alternative, per PR 2643
 1.12 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.11 27-Jan-1997  perry fix some nits from SAITOH Masanobu, pr-3149
 1.10 23-Jan-1997  mikel eliminate duplicate paragraph and fix typos; PR misc/3128
 1.9 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.8 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.7 06-Feb-1996  scottr Grammar police, noted by Peter Seebach <seebs@solon.com>; closes PR #1704.
 1.6 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS indentifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections.
 1.25.4.2 07-Apr-2004  jmc Pullup patch (requested by ws in ticket #132)

Update manual page to describe default route preferences better
 1.25.4.1 04-Apr-2001  he Pull up revision 1.30 (via patch, requested by wiz):
Don't xref gated(8) and htable(8), which we don't have.
 1.37.2.1 01-Apr-2004  jmc Pullup patch (requested by ws in ticket #1643)

Fix inconsistency between manual page and RFC 1256.
 1.5 20-Oct-1996  thorpej Remove the redundant copy of this file.
Suggested by David Carrel <carrel@ipsec.com>, PR #2872.
 1.4 24-Sep-1996  christos explicitly enumerate the ripv1 fields.
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.4 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.15 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.14 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.13 21-May-1995  mycroft Use inet_aton(), not inet_addr().
 1.12 24-Apr-1995  cgd fix arguments to tracing functions and/or cast, to avoid warnings.
 1.11 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.10 23-Dec-1994  cgd kill some redundant includes.
 1.9 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.8 31-Oct-1994  cgd pull in helpful includes.
 1.7 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.6 13-May-1994  mycroft Clean up import.
 1.5 11-Dec-1993  cgd fix from Brad Parker <brad@fcr.com> to curb routed inflation when
using MULTICAST. it wasn't properly ignoring the new interface flags.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.28 06-Feb-2018  mrg update for GCC 6:

- read_rt() has a missing {} issue.
 1.27 20-Dec-2016  ozaki-r Fix that routed deletes local routes

routed previousely ignored local routes, which have RTF_LOCAL flag, because
such routes have RTF_LLINFO and routed ignored routes having the flag. When
we obsoleted RTF_LLINFO, we removed the ignoring logic from routed, then
routed started removing local routes unexpectedly.

Fix this behavior by teaching local routes to routed to ignore them.

kardel@ reported the issue and helped testing, thanks!
 1.26 07-Oct-2016  joerg Shuffle pointer magic to not depend on temporary overaligned pointers
into a packed structure.
 1.25 04-Apr-2016  ozaki-r branches: 1.25.2;
Separate nexthop caches from the routing table

By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
- sysctl(NET_RT_DUMP) doesn't return them
- If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
- RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
- It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
- -[no]cloning remains because it seems there are users
- -[no]connected is introduced and recommended
to be used instead of -[no]cloning
- route show/netstat -r drops some flags
- 'L' and 'c' are not seen anymore
- 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html
 1.24 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.23 28-Dec-2008  christos fix printf formats.
 1.22 06-Jul-2004  mycroft branches: 1.22.26; 1.22.38;
PR 9431: if rnh_addradd() fails, total_routes will be wrong.
 1.21 21-Apr-2004  christos constification lossage (hi gimpy)
 1.20 21-Apr-2003  itojun branches: 1.20.2;
strcpy/sprintf cleanup. from openbsd
 1.19 15-Apr-2003  itojun use snprintf. there are more...
 1.18 15-Apr-2003  itojun array seems too small
 1.17 06-Dec-2002  thorpej Avoid strict alias warnings.
 1.16 30-Nov-2002  christos sync with routed 2.27
 1.15 02-Nov-2001  lukem fix -Wshadow warnings
 1.14 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.13 02-Mar-2000  christos make local functions static and portability casts.
 1.12 11-Feb-2000  christos PR/9390: Jarkko Torppa: Routed leaks memory when route addition fails.
 1.11 19-Nov-1999  bouyer Ignore RTM_OIFINFO messages (send by a COMPAT_14 kernel).
 1.10 25-Feb-1999  ross branches: 1.10.6;
LP64 tweaks.
 1.9 23-Feb-1999  christos Resolve conflicts.
 1.8 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.7 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.6 16-Sep-1997  mrg make these compile on the alpha after WARNS=1.
 1.5 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.4 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.5 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.4 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20.2.1 10-Jul-2004  tron Pull up revision 1.22 (requested by mycroft in ticket #615):
PR 9431: if rnh_addradd() fails, total_routes will be wrong.
 1.22.38.1 16-Aug-2010  matt Change to new route message sematics
 1.22.26.1 17-Jan-2009  mjf Sync with HEAD.
 1.25.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.25.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.8 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.7 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.6 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.15 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.14 28-May-1995  jtc <sys/errno.h> -> <errno.h>
<sys/signal.h> -> <signal.h>
<sys/syslog.h> -> <syslog.h>
 1.13 24-May-1995  christos Fix bug in af_format where the formatted address was returned in the same
static buffer. When af_format is used more than once in the same printf
statement, the second call will overwrite the first. Changed af_format to
take a buffer and the buffer size where to place the formatted string.
 1.12 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.11 23-Dec-1994  cgd kill some redundant includes.
 1.10 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.9 31-Oct-1994  cgd pull in helpful includes.
 1.8 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.7 13-May-1994  mycroft Clean up import.
 1.6 30-Dec-1993  cgd Undo that last change. It was 100%, beyond a doubt, completely bogus.
afswitch and af_max were still used, but since they was declared 'common'
by virtue of their declaration in af.h, the symbols were defined at link-
time, and their contents were considered BSS -- init to zero.
Now, you and i know that jumping to zero causes a core dump...
Therefore: af.c has been resurrected, so the procedure pointers actually
point to procedures, tables.c has had it's change nuked, and af.h
has been changed so afswitch and af_max are declared as 'extern'.
It's obvious that that 'fix' wasn't even tested.
 1.5 18-Dec-1993  mycroft Move inet_default into tables.c, and remove all of af.c, as it is no longer
used.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.8 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.7 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.6 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.33 02-Oct-2017  maya unifdef sgi. NFCI
 1.32 06-Apr-2009  lukem fix sign-compare issue
 1.31 22-Mar-2006  christos branches: 1.31.30;
Coverity CID 1301: Return early if we could not open /dev/null
 1.30 21-Apr-2004  christos constification lossage (hi gimpy)
 1.29 12-Jul-2003  itojun sprintf can return negative
 1.28 21-Apr-2003  itojun strcpy/sprintf cleanup. from openbsd
 1.27 30-Nov-2002  christos sync with routed 2.27
 1.26 24-Sep-2001  wiz va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
 1.25 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.24 02-Mar-2000  christos portability casts and re-indentation of some code.
 1.23 23-Feb-1999  christos Resolve conflicts.
 1.22 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.21 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.20 19-Oct-1997  mycroft Use S_IS*(), not S_IF*.
 1.19 16-Sep-1997  mrg make these compile on the alpha after WARNS=1.
 1.18 15-Sep-1997  lukem use memmove, memcmp, memset instead of bcopy, bcmp, bzero
 1.17 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.16 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.15 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.14 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.13 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.12 28-May-1995  jtc <sys/errno.h> -> <errno.h>
<sys/signal.h> -> <signal.h>
<sys/syslog.h> -> <syslog.h>
 1.11 24-Apr-1995  cgd fix arguments to tracing functions and/or cast, to avoid warnings.
 1.10 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.9 30-Jan-1995  mycroft Use S_IS*().
 1.8 23-Dec-1994  cgd kill some redundant includes.
 1.7 18-Dec-1994  cgd some -Wall changes, from Jim Jegers, improved (in some cases) by me.
still needs a bit of work, but closer.
 1.6 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.7 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.6 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.5 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.4 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.3 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.31.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.9 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.8 20-Jun-1995  christos - Support rip version 2.
- Add ansi prototypes.
- Be less internet centric.
- Convert queues to use <sys/queue.h> so we don't need -lcompat
 1.7 24-Apr-1995  cgd fix arguments to tracing functions and/or cast, to avoid warnings.
 1.6 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.5 13-May-1994  mycroft Clean up import.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2 22-Mar-1993  cgd added rcs ids to all files
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 14-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8 26-May-2011  joerg Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
 1.7 23-Apr-2002  msaitoh don't override LDSTATIC if NOPIC is defined.
 1.6 02-Mar-1998  cgd allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf
 1.5 10-Oct-1997  mikel link rtquery against dynamic libs; from Soren S. Jorvang in PR bin/4178
 1.4 20-Jun-1997  pk Install `rtquery' in /usr/sbin.
 1.3 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.4 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.2 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.1 03-Feb-1997  christos branches: 1.1.1;
Initial revision
 1.1.1.1 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.20 11-Sep-2009  wiz Add xref to pkgsrc/net/gated, so people know where to find gated(8).
Improve markup of RFCs in SEE ALSO.
Sort options.
Bump date.
 1.19 23-Sep-2003  wiz Correct error in previous, noted by Nick Hudson.
 1.18 07-Sep-2003  wiz Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
 1.17 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.16 16-Nov-2001  wiz Sort SEE ALSO.
 1.15 05-Jun-2001  wiz Drop argument of .Os.
 1.14 23-Feb-1999  christos Resolve conflicts.
 1.13 22-Nov-1998  msaitoh s/ and and / and /
 1.12 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.11 18-Aug-1998  msaitoh fix a roff command bug
 1.10 29-Apr-1998  fair fix bad .Xr references
 1.9 11-Oct-1997  enami - Use .Nm "" instead of .Nm rtquery in SYNOPSIS.
- Don't use captialized wort to refer command name.
- Delete period at the end of ``SEE ALSO'' list.
- Use .Xr instead of .Em to refer routed.
 1.8 10-Oct-1997  lukem all but the first .Nm in SYNOPSIS need to be spelt out. [bin/4256]
 1.7 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.6 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.5 27-Jan-1997  perry fix some nits from SAITOH Masanobu, pr-3149
 1.4 17-Jan-1997  perry fix .I which should be .Em, from SAITOH Masanobu in pr-3109
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.4 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.25 23-Mar-2014  dholland don't use sprintf
 1.24 19-Oct-2013  christos gcc warns about array bounds limits, but unfortunately the API here requires
flex arrays in a union which is not allowed. So do a trivial pointer assignment
to baffle gcc again.
 1.23 29-Aug-2011  joerg branches: 1.23.2; 1.23.8;
Use __dead
 1.22 26-Oct-2009  christos merge 2.32 which is actually 2.31. Most important change is:
- use multicast over point-to-point (GRE) links as proposed by Dan Lukes.
 1.21 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.20 15-Dec-2007  perry branches: 1.20.4; 1.20.8;
convert __attribute__s to applicable cdefs.h macros
 1.19 16-Sep-2007  ragge branches: 1.19.2;
__attribute -> __attribute__.
 1.18 10-May-2006  mrg branches: 1.18.10;
quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
 1.17 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.16 30-Nov-2002  christos sync with routed 2.27
 1.15 06-Apr-2001  wiz Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
 1.14 10-Mar-2001  christos sync with version 2.24. Vernon says:
The most significant [fix] involves so called "remote" interfaces
configured in the kludge file to with what appear to be colliding
networks. Edward Mascarenhas <eddiem@vihar.engr.sgi.com> found
the problem and the fix, and I think has tested it in the SGI
network.
 1.13 27-Jul-2000  thorpej Pull in <md5.h> rather than defining our own MD5 structures (!).
 1.12 02-Mar-2000  christos portability casts
 1.11 19-Aug-1999  christos negative ip octets don't make sense. Now we print byte swapped but the
addresses are at least recognizable without negating :-)
 1.10 23-Feb-1999  christos Resolve conflicts.
 1.9 25-Oct-1998  christos Update to 980910 from ftp.rhyolite.com
 1.8 02-Jun-1998  thorpej Merge the 980602 RIPv2/Router Discovery routed. Fixes floods of host routes
generated when one of the interfaces on the network does not support
broadcast (e.g. HIPPI or ATM).

From Vern Schryver <vjs@rhyolite.com>
 1.7 02-Jun-1998  kleink Remove the unrecognized `-v' option from the usage information;
from Geoff C. Wing in PR bin/5521.
 1.6 30-Mar-1998  mrg add noreturn attribute, and fix the return value of main.
 1.5 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* bcmp, bcopy, bzero, rindex -> memcmp, memmove, memset, strrchr
* correct use of .Nm
 1.4 03-Feb-1997  christos - resolve conflicts.
- remove md5 stuff; it is in libc.
- define MCAST_PPP_BUG, until we fix if_ppp.c
 1.3 24-Sep-1996  christos - resolve conflicts
- try to follow rcsid style more closely
- fix rn_walktree callback routine signatures.
 1.2 10-Aug-1996  thorpej - Finished up merge.

- Add some prototypes and definitions for types as necessary,
wrapped in __NetBSD__ to maintain portability.

- Explicit size types in structures that go out the wire.

- RCS id police.
 1.1 10-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.5 23-Feb-1999  christos Latest version of routed(8) from Vernon Schryver <vjs@calcite.rhyolite.com>
 1.1.1.4 02-Jun-1998  thorpej Latest RIPv2/Router Discovery routed, from Vern Schryver <vjs@rhyolite.com>
 1.1.1.3 03-Feb-1997  christos New version from ftp.sgi.com:sgi/src/routed.tar.Z
 1.1.1.2 24-Sep-1996  christos Latest version of routed(8) from Vernon Schryver <vjs@sgi.com>
 1.1.1.1 10-Aug-1996  thorpej A leaner, meaner routed(8), implementing RIPv1, RIPv2, and ICMP Router
Discovery, courtesy of Vernon Schryver <vjs@sgi.com>. Thanks!
 1.18.10.2 09-Jan-2008  matt sync with HEAD
 1.18.10.1 06-Nov-2007  matt sync with HEAD
 1.19.2.1 27-Dec-2007  mjf Sync with HEAD.
 1.20.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.4.1 28-Sep-2008  mjf Sync with HEAD.
 1.23.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed