Home | History | Annotate | Download | only in route6d
History log of /src/usr.sbin/route6d/route6d.c
RevisionDateAuthorComments
 1.74  11-Jul-2019  msaitoh Fix typo (s/supress/suppress/).
 1.73  05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.72  14-Jun-2018  christos branches: 1.72.2;
PR/53365: Thomas Barabosch: memory leak in route6d
XXX: pullup 7, 8
 1.71  09-May-2018  maxv Rename allocopy -> xstrdup, and simplify.
 1.70  09-May-2018  maxv Clean up.
 1.69  09-May-2018  maxv Remove dead/broken code.
 1.68  04-Apr-2016  ozaki-r branches: 1.68.8; 1.68.14;
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.67  15-Apr-2013  kardel reenable routing functionality by using RT_ROUNDUP for ROUNDUP when available
 1.66  31-Aug-2011  plunky branches: 1.66.2; 1.66.4; 1.66.8;
NULL does not need a cast
 1.65  31-Aug-2011  mbalmer Remove double 'static'.
 1.64  30-Aug-2011  joerg static + __dead + G/C
 1.63  23-Apr-2010  plunky no [longer?] need to define _KERNEL when including <net/route.h>
 1.62  19-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wsign-compare)
 1.61  21-Jan-2008  dyoung branches: 1.61.12;
#include <stdbool.h> for bool.
 1.60  29-Apr-2007  msaitoh branches: 1.60.4;
fix typos
 1.59  07-Oct-2006  elad PR/18906: roskens at elfin dot net: misc. select() to poll() updates.

Adapted to -current by myself, thanks for the patch!
 1.58  25-May-2006  rpaulo Add missing #endif.
 1.57  25-May-2006  rpaulo Beautify.
 1.56  25-May-2006  rpaulo Time to remove __P().
 1.55  25-May-2006  christos Coverity CID 2537: Avoid double free, and random free. how did this work?
 1.54  25-May-2006  christos Coverity CID 3194: Avoid NULL deref.
 1.53  25-May-2006  christos Coverity CID 3195: ifdef out dead code.
 1.52  25-Feb-2006  wiz Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
 1.51  31-Oct-2003  hannken Let it compile again on sparc/sparc64.
 1.50  31-Oct-2003  itojun need_trigger/idx should be u_int. millert@openbsd
 1.49  30-Oct-2003  itojun validate packet length. KAME-PR-517
 1.48  19-Sep-2003  itojun realloc pedant
 1.47  22-Aug-2003  itojun Don't age non-gateway host routes. PR bin/22568 from Andrew White
 1.46  22-Apr-2003  itojun port numbers are unsigned. use %u. from kame
 1.45  15-Apr-2003  itojun %d is not 10 chars, but 12 chars. uwse NI_MAXSERV. sync w/ kame. from openbsd
 1.44  26-Oct-2002  itojun use strtoul, not atoi.
don't print strerrno() if errno == 0 on fatal().
sync w/kame
 1.43  27-Sep-2002  itojun IPV6_V6ONLY setsockopt has to happen before bind(2). PR 18435
 1.42  24-Sep-2002  itojun set IPV6_V6ONLY to 1.
 1.41  23-Sep-2002  mycroft null commit
 1.40  20-Sep-2002  itojun sys/poll.h -> poll.h
reduce diff w/ kame tree.
 1.39  20-Sep-2002  mycroft Set fd of unused pollfd entries to -1.
 1.38  20-Sep-2002  mycroft select() -> poll()
 1.37  21-Aug-2002  itojun suppress output on dump request if -q is specified. sync w/kame
 1.36  01-Aug-2002  wiz Unifdef __STDC__, ansify.
 1.35  09-Jun-2002  itojun use strchr
 1.34  07-Jun-2002  itojun avoid fd_set overrun. sync w/kame
 1.33  29-May-2002  itojun strlcpy. rtm_seq is an int. use pidfile(3). sync w/kame via openbsd
 1.32  25-Feb-2002  itojun branches: 1.32.2;
do not age global address on loopback interface. sync with kame
 1.31  11-Jan-2002  itojun daemon(3) has to be called before opening file descriptors.
noticed by markus@openbsd, sync with kame
 1.30  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.29  05-Sep-2001  itojun sync with the latest KAME tree.
- don't use FD_SETSIZE on select
- "sin" conflicts with math library, so use sin6
- other minor updates
 1.28  13-Jun-2001  itojun need va_start/end for every vfprintf(). from markus@openbsd. sync with kame
 1.27  07-May-2001  kleink getopt(3): EOF -> -1.
 1.26  06-Apr-2001  wiz Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
 1.25  08-Mar-2001  itojun correct delroute() against host routes. clarify ROUTE6D p2p advert behavior
(no behavior change for normal use). sync with kame
 1.24  07-Feb-2001  itojun bring in latest kame code.
- correct RTA_NETMASK processing
- correct -A filter behavior (do not advert aggregated route to other if)
- better signal handling
- mandate getifaddrs
- do not advert connected routes on !IFF_UP routes. experimental
sync with kame
 1.23  07-Feb-2001  pk setindex2ifc(): after a realloc(), zero the newly acquired entries.
 1.22  12-Jan-2001  itojun make signo a volatile variable. sync with kame
 1.21  12-Jan-2001  itojun make signal handler very short, to avoid possibility of race conditions.
commented by deraadt. sync with kame
 1.20  10-Nov-2000  itojun do not advertise dynamic/cloned routes
 1.19  10-Oct-2000  itojun cast size_t to u_long on printing. sync with kame
 1.18  06-Oct-2000  itojun printf-format audit. from sommrfeld@netbsd.org. sync with kame.
 1.17  13-Aug-2000  itojun fix LP64 issue in routing message parsing. from thorpej
 1.16  30-Jul-2000  itojun fix behavior or -A. routing table check does not seem to working right.
 1.15  15-Jul-2000  itojun sync with latest kame.
- remove obsolete non-advanced-api support.
- if a routing entry exists for aggregate prefix (-A), do not overwrite
the routing entry (exit with error).
 1.14  09-Jul-2000  itojun sync with more recent kame.
- fix memory leak with realloc()
- warn if we see packets with junk outside of IPv6 prefix length
- cosmetic
 1.13  18-May-2000  itojun branches: 1.13.4;
more correct advert for global address on p2p.
avoid reusing upper bits of rtm_flags. (sync with kame)
 1.12  16-May-2000  itojun correct p2p interface address handling.
avoid memory leak.
bzero() after malloc().
(sync from kame)
 1.11  11-Apr-2000  itojun ignore routing socket messages for unexpected (or not interesting) interfaces.
do not advertise reject/blackhole static routes.
 1.10  25-Feb-2000  itojun use getifaddrs. avoid "extern int errno".
(sync with latest kame code)
 1.9  13-Sep-1999  itojun sync with recent KAME code.
- bark if extra argument is specified.
 1.8  03-Sep-1999  itojun sync with recent KAME.
- fix 64bit alignment issue in routing socket.
- avoid s6_addr8 (nonstandard), use s6_addr instead.
 1.7  26-Jul-1999  itohy Eliminate illegal cast from function pointer (sig_t) to object pointer (void *).
Remove #include of unused headers.
Fix varargs usage.
KNF.
Const poisoning.
 1.6  08-Jul-1999  itojun style fix (to sync with KAME/NetBSD14)
 1.5  08-Jul-1999  sommerfeld Fix a bit-count vs. byte-count problem .. /16 routes were added as
host routes rather than network routes.
 1.4  06-Jul-1999  itojun fix for 64bit arch (sizeof(void *) != sizeof(int))
 1.3  04-Jul-1999  itojun s/char/int/ for variable that eat return value of getopt().
 1.2  04-Jul-1999  itojun add NetBSD RCS ID.
 1.1  02-Jul-1999  itojun route6d: RIPng daemon (similar to route6d)
rip6query: RIPng query (similar to ripquery)

NOTE: we usually do not run route6d on end nodes at startup (rtsol should do
the trick). So I figured that route6d can be in /usr/sbin, not in /sbin
(routed is in /sbin). Correct me if I'm wrong.
 1.13.4.9  26-Aug-2004  jmc Pullup patch (requested by he in ticket #157)

Make route6d compile on alpha
 1.13.4.8  12-Apr-2004  jmc Pullup patch (requested by itojun in ticket #105)

Validate packet length.
 1.13.4.7  12-Apr-2004  jmc Pullup patch (requested by itojun in ticket #73)

Don't age non-gateway host routes. PR#22568
 1.13.4.6  18-Oct-2000  tv Pullup 1.18 [itojun]:
printf-format audit. from sommrfeld@netbsd.org. sync with kame.
 1.13.4.5  17-Oct-2000  tv Pullup 1.19 [itojun]:
cast size_t to u_long on printing. sync with kame
 1.13.4.4  13-Aug-2000  itojun pullup 1.15 -> 1.16 (approved by releng-1-5)
fix behavior or -A. routing table check does not seem to working right
 1.13.4.3  13-Aug-2000  itojun pullup 1.6 -> 1.7 (approved by releng-1-5)
fix LP64 problem in routing message parsing.
 1.13.4.2  15-Jul-2000  itojun pullup (approved by releng-1-5)

sync with latest kame.
- remove obsolete non-advanced-api support.
- if a routing entry exists for aggregate prefix (-A), do not overwrite
the routing entry (exit with error).

1.2 -> 1.3 basesrc/usr.sbin/route6d/Makefile
1.14 -> 1.15 basesrc/usr.sbin/route6d/route6d.c
 1.13.4.1  13-Jul-2000  thorpej Update from trunk (itojun):
sync with more recent kame.
- fix memory leak with realloc()
- warn if we see packets with junk outside of IPv6 prefix length
- cosmetic
 1.32.2.5  15-Mar-2004  jmc Pullup rev 1.50 (requested by martin in ticket #1627)

Need_trigger/idx should be u_int
 1.32.2.4  15-Mar-2004  jmc Pullup rev 1.51 (requested by martin in ticket #1626)

Let it compile again on sparc/sparc64.
 1.32.2.3  12-Mar-2004  jmc Pullup rev 1.49 (requested by itojun in ticket #1551)

Validate packet length.
 1.32.2.2  04-Oct-2003  tron Pull up revision 1.47 (requested by itojun in ticket #1432):
Don't age non-gateway host routes. PR bin/22568 from Andrew White
 1.32.2.1  22-Aug-2002  lukem Pull up revision 1.37 (requested by itojun in ticket #711):
suppress output on dump request if -q is specified. sync w/kame
 1.60.4.1  23-Mar-2008  matt sync with HEAD
 1.61.12.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.66.8.1  23-Jun-2013  tls resync from head
 1.66.4.1  03-Nov-2014  msaitoh Pull up following revision(s) (requested by gdt in ticket #1164):
usr.sbin/route6d/route6d.c: revision 1.67
reenable routing functionality by using RT_ROUNDUP for ROUNDUP when available
 1.66.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")
 1.68.14.2  25-Jun-2018  pgoyette Sync with HEAD
 1.68.14.1  21-May-2018  pgoyette Sync with HEAD
 1.68.8.2  21-Jun-2023  martin Fix merge mishap in ticket #1820
 1.68.8.1  01-Apr-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1820):

usr.sbin/route6d/route6d.c: revision 1.72

PR/53365: Thomas Barabosch: memory leak in route6d
 1.72.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.72.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed