Commit graph

131 commits

Author SHA1 Message Date
Gleb Smirnoff 56d5e0967c Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Hiroki Sato e58fde506c Fix buffer overrun.
MFC after:	1 day
2014-10-11 20:46:06 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Hiroki Sato afe41db1ab Use sysctl(ICMPV6CTL_ND6_DRLIST) instead of SIOCGDRLST_IN6 ioctl. 2013-08-17 22:13:26 +00:00
Hiroki Sato a678ca234f - Remove struct ifinfo *iflist. It is no longer used.
- Suppress warnings about increase of alignment requirement.
2013-08-17 19:23:35 +00:00
Hiroki Sato 3774384085 Fix build on arm and mips. 2013-08-06 15:49:18 +00:00
Hiroki Sato 7d26db1792 - 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
2013-08-05 20:13:02 +00:00
Kevin Lo fb7a6f238f Silent warnings. 2013-07-16 03:12:31 +00:00
Mark Johnston dd3368997e - Fix wording. [1]
- Improve the descriptions in the FILES section. [2]

Reported by:	Jason McIntyre [1]
Obtained from:	NetBSD [2]
MFC after:	3 days
2013-05-28 13:54:26 +00:00
Mark Johnston dcc8e5487b Correct the description of the -a option: rtsol(d) -a will in fact send out
router solicitations on multiple interfaces.

Reviewed by:	hrs
MFC after:	1 week
2013-05-23 19:47:35 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Eitan Adler e0ef7724c3 Fix warning when compiling with gcc46:
error: variable 'target' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:52 +00:00
Ulrich Spörlein 3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
Hiroki Sato 489e04d0da - Add ":origin" label to the interface id for resolvconf(8). (r223149)
- Add -u option to enable adding :[RA-source-address] to the interface id.
  (r223149)
- s/INET6_ADDRSTRLEN/sizeof(ntopbuf)/  (r223149)
- Fix a bug that can prevent -D from being overridden by -d. (r223149)
- /-P pidfile/-p pidfile/ for consistency with rtadvd(8). (r223149)
- Fix -F flag handling to support receiving RAs even when ip6.forwarding=1.
  (r225150)

Approved by:	re (kib)
2011-09-12 23:55:23 +00:00
Hiroki Sato 06056832ec - Accumulate RA options instead of replacing old ones when a new RA arrived.
RFC 4861 6.3.4 clearly defines handling multiple RAs in this way.

- RDNSS/DNSSL options from multiple RAs on a single link will be
  gathered and sent to resolvconf(8).

- Call "resolvconf -d" only after at least one RDNSS or DNSSL option is
  received and then all of them are expired.

- The rtsold.dump output now supports displaying a list of the RA options.

- Use more human-readable expression for logging values of struct timeval.

Discussed with:	ume
2011-06-08 16:03:29 +00:00
Hiroki Sato b4da9fbccd - Disable "resolvconf -d" temporarily to avoid extra invocations of the script
under a certain condition.
- Fix argv handling.

Spotted by:	ume
2011-06-08 04:06:56 +00:00
Marcel Moolenaar 1d90532abe Lower WARNS level to 3 to eliminate alignment warnings related to
casting inherent in CMSG_DATA().
2011-06-07 04:38:33 +00:00
Ed Schouten 48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Hiroki Sato db82af41db - 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]
2011-06-06 03:06:43 +00:00
Ulrich Spörlein 0b31f1f731 mdoc: move remaining sections into consistent order
This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

Found by:	mdocml lint run
Reviewed by:	ru
2010-05-13 12:08:11 +00:00
Ulrich Spörlein bd2c49af72 rtsol(8)/rtsold(8): make WARNS=3 clean
It is actually WARNS=6 clean for non-strict alignment archs.

Approved by:	ed (co-mentor)
2010-02-27 10:19:39 +00:00
Hajimu UMEMOTO 62fd5fd625 Exclude the interfaces which IPv6 and/or accepting RA is disabled
from the auto probed interface list.

MFC after:	1 week
2010-02-02 18:38:17 +00:00
Hajimu UMEMOTO 3ce74ea2c5 Make -a option actually work.
MFC after:	1 week
2010-02-02 16:02:09 +00:00
Xin LI f3f0a6c957 Test index value is within the range before using it to reference
array member.

PR:		bin/141838
Submitted by:	Henning Petersen <henning.petersen@t-online.de>
MFC after:	2 weeks
2010-01-04 18:04:36 +00:00
Ed Schouten 71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Hiroki Sato eb87e699b2 Add support for ND6_IFF_IFDISABLED and ND6_IFF_ACCEPT_RTADV to
the -F flag.

MFC after:	3 days
2009-09-12 22:14:58 +00:00
Daniel Gerzo f104fc9b44 - rename the RETURN VALUES section to EXIT STATUS [1]
- convert to .Ex macro
- not bumping a date as this is not a real content change

Approved by:	ru
MFC after:	3 days
2009-01-07 00:54:30 +00:00
Andrey A. Chernov a08f0b20be Change arc4random to arc4random_uniform since modulo is not power of 2,
as OpenBSD does.

Obtained from:  OpenBSD
2008-07-26 15:46:39 +00:00
Kevin Lo 784bddbc5b Cleanup of userland __P use 2007-11-07 10:53:41 +00:00
Dima Dorfman 7d6f91e27b Improve wording for -f and -F. 2006-08-14 08:49:08 +00:00
Yaroslav Tykhiy 064aa4479f These IPv6-only tools have no explicit dependency on the INET6 macro.
Tested with:	cmp(1)
2006-07-27 15:31:13 +00:00
SUZUKI Shinsuke 4b8b545e4b fixed a potential memory leak
Obtained from: KAME
MFC after: 1 day
2006-03-24 23:59:51 +00:00
SUZUKI Shinsuke 06755c2216 an English grammar fix
Reported by: ru
MFC after: 1 day
2005-06-09 09:28:35 +00:00
SUZUKI Shinsuke c27109e92b fixed typo
Obtained from: KAME
MFC after: 1 day
2005-06-08 23:51:42 +00:00
Ruslan Ermilov 6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Ruslan Ermilov 07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov ec57a38507 Fixed a warning. 2004-03-17 20:10:59 +00:00
Hajimu UMEMOTO 5538fd1e35 -DSMALL will remove the need of dump.c (for rtsol)
Obtained from:	KAME
2004-01-14 17:59:38 +00:00
Hajimu UMEMOTO fcdaee3127 add -F flag, which configures sysctl(8) setting by rtsold
itself (rather than warn about the current setting).

Obtained from:	KAME
2004-01-14 17:42:03 +00:00
Hajimu UMEMOTO 8e7409eda3 ansify.
Obtained from:	KAME
2004-01-14 17:16:19 +00:00
Hajimu UMEMOTO d05ae8c388 use timeradd/sub/cmp.
Obtained from:	KAME
2004-01-14 16:55:08 +00:00
Hajimu UMEMOTO 96316581fc backout 1.11. ifname in struct ifreq should be copyed by strncpy.
Pointed out by:	itojun
2003-08-17 11:54:58 +00:00
Hajimu UMEMOTO 9a364ca35a - improved the -a option. it can probe a interface automatically when
the interface wake up.  it can be started anytime even when there is
  no network interface on the list of intarfaces in the kernel.
- get a correct link ID for each interface at initialization
  (using scope libraries if HAVE_SCOPELIB is defined).
- fill in sin6_scope_id correctly before sendmsg().

Obtained from:	KAME
MFC after:	1 week
2003-08-17 11:11:32 +00:00
Hajimu UMEMOTO 4774e8e607 use strlcpy().
Pointed out by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
MFC after:	1 week
2003-08-16 20:19:20 +00:00
Hajimu UMEMOTO 131033d55c - added the case of 802.11 to check link status.
- use strncpy just in case.
- __P() cleanup.

Obtained from:	KAME
MFC after:	1 week
2003-08-16 19:00:32 +00:00
Hajimu UMEMOTO 5c706347d5 support poll(2).
Obtained from:	KAME
MFC after:	1 week
2003-08-14 18:43:57 +00:00
Hajimu UMEMOTO 92bdf888a6 daemon() has to be called prior to file descriptor setups
(otherwise file descriptors could be closed mistakenly)

Obtained from:	KAME
MFC after:	1 week
2003-08-14 18:13:34 +00:00
Hajimu UMEMOTO 653b3bd48b signal handler must take "int" arg.
Obtained from:	KAME
MFC after:	1 week
2003-08-14 15:57:52 +00:00
Hajimu UMEMOTO 8998f69b13 avoid fd_set overrun.
Obtained from:	KAME
MFC after:	1 week
2003-08-14 15:47:31 +00:00
Hajimu UMEMOTO 7bc56ec444 decreased too-strong log levels.
Obtained from:	KAME
MFC after:	1 week
2003-08-14 15:21:55 +00:00
Hajimu UMEMOTO b6ed844ff2 reduce #ifdef.
MFC after:	1 week
2003-08-11 15:51:54 +00:00
Hajimu UMEMOTO bb58b617fb use strlcpy() and snprintf().
Obtained from:	KAME
MFC after:	1 week
2003-08-11 15:49:47 +00:00
Hajimu UMEMOTO fa19f9be04 KNF, correct typos and cleanup spaces.
Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:56:01 +00:00
Hajimu UMEMOTO 5ed8c16b88 drop the code for the environment where getifaddrs(3) is not
supported.

Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:52:31 +00:00
Hajimu UMEMOTO 86b032af6c Process the "O bit."
If the value of OtherConfigFlag changes from FALSE to TRUE, the
host should invoke the stateful autoconfiguration protocol,
requesting information.
[RFC 2462 Section 5.5.3]

Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:42:37 +00:00
Hajimu UMEMOTO 1533bed05b __FUNCTION__ --> __func__
Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:38:23 +00:00
David E. O'Brien 052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Andrey A. Chernov 21c7f9f0ad Add -DHAVE_ARC4RANDOM to CFLAGS 2003-02-11 02:25:00 +00:00
Ruslan Ermilov facc67676f mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
Philippe Charnier 490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
SUZUKI Shinsuke 16837d2d21 Explicitly specifies sin6_family & sin6_len of sockaddr_in6 for raw socket
destination.
(Currently lack of their specification does not lead to any problem, because
 kernel does not check the consistency between actual address and its
 address family / length on raw socket.

 However kernel should always check their consistency and stop sending packets
 if there is a contradiction.  Considering backward compatibility of
 programs, I just fixed rtsol now;  I'd like to fix the kernel behavior later.)

Reviewed by: ume
MFC after: 3 days
2002-04-19 11:39:54 +00:00
Hajimu UMEMOTO b795e6e3ac typo. netbsd PR 16055
Obtained from:	KAME
MFC after:	1 week
2002-03-29 04:43:07 +00:00
Ruslan Ermilov 6658f7a13b mdoc(7) police: Fixed the .Ex calls in manpages that describe more
than one utility.

PR:		docs/30437
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2001-09-11 12:27:15 +00:00
Ruslan Ermilov d628d776c4 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
Ruslan Ermilov c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
David E. O'Brien 90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Hajimu UMEMOTO 3384154590 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
2001-06-11 12:39:29 +00:00
Ruslan Ermilov 345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ruslan Ermilov e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Kris Kennaway 804c83d4bd Sync with KAME. Format string auditing, and add -a flag to autoprobe
interfaces.

Obtained from:	KAME
2000-10-06 23:46:52 +00:00
Kris Kennaway 8b15840355 Correct style bugs 2000-07-06 02:00:18 +00:00
Kris Kennaway 259df286b9 Sync with latest KAME.
Obtained from:	KAME
2000-07-05 10:14:11 +00:00
Yoshinobu Inoue 04e8772051 remove redundant ifdef's.
some part is specified by: phantom
2000-01-07 10:02:43 +00:00
Yoshinobu Inoue 7d56d3747c Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-28 02:37:14 +00:00