History log of /freebsd-10.1-release/usr.sbin/rtadvd/rtadvd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 253970 05-Aug-2013 hrs

- Use time_uptime instead of time_second in data structures for
PF_INET6 in kernel. This fixes various malfunction when the wall time
clock is changed. Bump __FreeBSD_version to 1000041.

- Use clock_gettime(CLOCK_MONOTONIC_FAST) in userland utilities.

MFC after: 1 month


# 253058 09-Jul-2013 hrs

- Add missing "static" keywords.
- Add a check for ifindex to if_indextoifinfo(). It returns NULL when
if_indextoname() fails.

MFC after: 3 days


# 247863 06-Mar-2013 hrs

Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.


# 247270 25-Feb-2013 des

- Implement and use usage().
- Document the -C option.
- Allow rtadvd to be invoked without any interfaces on the command line,
and document that possibility.

MFC after: 1 week


# 228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


# 225683 19-Sep-2011 hrs

Remove RA timer on an interface with !IFF_UP actively after starting to send
clean-up RA messages for shutting down. The RA timers could prevent the rtadvd
daemon from shutting down because ra_output() just ignored !IFF_UP interfaces
and TRANSITIVE->UNCONFIGURED state transition never happened due to it.

Spotted by: kib
Approved by: re (bz)


# 225519 12-Sep-2011 hrs

- Fix a bug that can lead to displaying an incorrect value. (r224210)
- Fix an abnormal termination caused by twice of "rtadvctl disable". (r224303)
- Use poll() to wait for the control message socket instead of a spin loop.
(r224304)
- s/cmsg_/cm_/ to avoid conflict with CMSG_* symbols for struct cmsghdr.
(r224619)
- Ignore an interface that never sent RAs for graceful shut-down. (r224620)
- Refine log messages. (r225148)
- Fix SIGSEGV when receiving RAs that contain RDNSS and/or DNSSL options.
(r225149)

Approved by: re (kib)


# 224144 17-Jul-2011 hrs

- Improve interface list handling. The rtadvd(8) now supports dynamically-
added/removed interfaces in a more consistent manner and reloading the
configuration file.

- Implement burst unsolicited RA sending into the internal RA timer framework
when AdvSendAdvertisements and/or configuration entries are changed as
described in RFC 4861 6.2.4. This fixes issues that make termination of the
rtadvd(8) daemon take very long time.

An interface now has three internal states, UNCONFIGURED, TRANSITIVE, or
CONFIGURED, and the burst unsolicited sending happens in TRANSITIVE.
See rtadvd.h for the details.

- rtadvd(8) now accepts non-existent interfaces as well in the command line.

- Add control socket support and rtadvctl(8) utility to show the RA information
in rtadvd(8). Dumping by SIGUSR1 has been removed in favor of it.


# 222972 11-Jun-2011 hrs

Support SIGHUP for reloading /etc/rtadvd.conf.


# 222743 06-Jun-2011 hrs

Fix build on 64-bit arch.

Submitted by: dim
Pointy hat to: hrs


# 222732 06-Jun-2011 hrs

- Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisement
Options for DNS Configuration) into rtadvd(8) and rtsold(8). DNS
information received by rtsold(8) will go to resolv.conf(5) by
resolvconf(8) script. This is based on work by J.R. Oldroyd (kern/156259)
but revised extensively[1].

- rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes
from interfaces when no "addr" is specified[2]. An entry in rtadvd.conf
with "noifprefix" + no "addr" generates an RA message with no prefix
information option.

- rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an
interface is added or removed.

- Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191.

Reviewed by: bz[1]
PR: kern/156259 [1]
PR: bin/152458 [2]


# 219184 02-Mar-2011 bz

Prevent crashes from a race when (cloned) interfaces go away.

PR: bin/152143
Submitted by: Przemyslaw Frasunek (przemyslaw frasunek.com)
Tested by: Przemyslaw Frasunek (przemyslaw frasunek.com)
MFC after: 1 week


# 216675 22-Dec-2010 delphij

Allow overriding pidfile and dumpfile.

PR: bin/153362
Submitted by: Joe Holden <joe rewt org uk>
MFC after: 1 month


# 180823 26-Jul-2008 ache

Change 2 arc4random modulo operations to arc4random_uniform() as
OpenBSD does, since modulo is not power of 2.

Obtained from: OpenBSD


# 173412 07-Nov-2007 kevlo

Cleanup of userland __P use


# 166134 20-Jan-2007 maxim

o Remove duplicate includes.

Obtained from: Slava Semushin via NetBSD


# 151470 19-Oct-2005 suz

changed syslog level to more appropriate ones

Obtained from: KAME
Reviewd by: ume, gnn
MFC after: 2 weeks


# 151469 19-Oct-2005 suz

source link-layer address option should be marked to be checked later,
because rs_input() need this option.

Obtained from: KAME
Reviewed by: ume, gnn
MFC after: 2 weeks


# 118968 15-Aug-2003 ume

- supported a string notation for xxflags.
- deprecate routes#N, as it is hard to keep consistency with
rtprefixN. accept any number of "rtprefix", "rtrefix0",
..., "rtprefix99".
- deprecate "addrs#N", as it is difficult for users to keep
consistency with "addrN".
accept 100 prefix info in maximum - like "addr", "addr0"
... "addr99". WARNS=2 clean on netbsd.
old configuration file should work just fine.
behavior change:
previously, we rejected "addrN" if there's "addr", and we rejected
"addr" if there is "addrN". now we accept both without problem.
- when an advertised prefix configured from the kernel has been added
or invalidated, notice the change in a short delay.
- when invalidating a prefix, do not bark even if there is
inconsistency about prefix lifetimes.
- wrap more specific route info code into ROUTEINFO.

Obtained from: KAME
MFC after: 1 week


# 118962 15-Aug-2003 ume

use arc4random.

Obtained from: KAME
MFC after: 1 week


# 118961 15-Aug-2003 ume

variable shared with signal handler needs to be "volatile sig_atomic_t".

Obtained from: KAME
MFC after: 1 week


# 118959 15-Aug-2003 ume

set LOG_PERROR for openlog() when running foreground.

Obtained from: KAME
MFC after: 1 week


# 118920 14-Aug-2003 ume

daemon() has to be called prior to file descriptor setups
(otherwise file descriptors could be closed mistakenly)

Obtained from: KAME
MFC after: 1 week


# 118916 14-Aug-2003 ume

support poll(2).

Obtained from: KAME
MFC after: 1 week


# 118913 14-Aug-2003 ume

- rename some variables.
- remove unused block.

Obtained from: KAME
MFC after: 1 week


# 118912 14-Aug-2003 ume

signal handler must take "int" arg.

Obtained from: KAME
MFC after: 1 week


# 118911 14-Aug-2003 ume

avoid fd_set overrun.

Obtained from: KAME
MFC after: 1 week


# 118672 08-Aug-2003 ume

Drop MIP6 code. We don't support MIP6 yet.

MFC after: 1 week


# 118664 08-Aug-2003 ume

KNF, correct typos and cleanup spaces.

Obtained from: KAME
MFC after: 1 week


# 118660 08-Aug-2003 ume

__FUNCTION__ --> __func__

Obtained from: KAME
MFC after: 1 week


# 112676 26-Mar-2003 ume

tightened check for the length of ND options.

Submitted by: jinmei@kame.net (JINMEI Tatuya)
Obtained from: KAME


# 110668 11-Feb-2003 ache

Use srandomdev() for FreeBSD


# 98172 13-Jun-2002 ume

Changed the behavior when an interface-direct prefix being advertised
was removed from the kernel;
Advertise the prefix with zero lifetimes rather than to remove the prefix
from the prefix list to be advertised.
This will help renumber a receiving host by deprecating the address
derived from the old prefix.

Obtained from: KAME
MFC after: 2 weeks


# 97719 01-Jun-2002 ume

Skip duplicated prefixes in get_prefix().

Obtained from: KAME


# 97712 01-Jun-2002 ume

KNF

Obtained from: KAME


# 78064 11-Jun-2001 ume

Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.

Reviewed by: itojun
Obtained from: KAME
MFC after: 3 weeks


# 71333 21-Jan-2001 itojun

make it easier to handle $FreeBSD$ tags (amount of diff matters).


# 62656 05-Jul-2000 kris

Sync with latest KAME

Obtained from: KAME


# 57435 24-Feb-2000 shin

Print ifname when sendmsg failed.

Approved by: jkh


# 57238 15-Feb-2000 shin

-P option was not enabled, so enable it
(The option specify IPsec policy for rtadvd to receive Router Renumbering
messages.)

Approved by: jkh


# 55505 06-Jan-2000 shin

libipsec and IPsec related apps. (and some KAME related man pages)

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project