Commit Graph

96 Commits

Author SHA1 Message Date
Andriy Voskoboinyk
2bbd06fc33 Garbage collect IFT_IEEE80211 (but leave the define for possible reuse)
This interface type ("a parent interface of wlanX") is not used since
r287197

Reviewed by:	adrian, glebius
Differential Revision:	https://reviews.freebsd.org/D9308
2017-01-28 17:08:40 +00:00
Mark Johnston
5c3f6d4977 rtsold: Log messages about unexpected RAs at LOG_DEBUG.
Because rtsold listens for RAs on a raw socket, it may receive RAs from
interfaces that it does not manage. Such events can result in excessive
logging.

Submitted by:	Franco Fichtner <franco@opnsense.org>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8108
2016-10-02 00:56:21 +00:00
Don Lewis
dc47112fa5 Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by:	Coverity
CID:		99186, 991864, 991865
MFC after:	1 week
2016-05-15 22:17:41 +00:00
Mark Johnston
0386a98bd0 Use the _SAFE loop variant, since the loop body may remove queue entries.
PR:		207146
MFC after:	3 days
2016-02-18 01:58:26 +00:00
Ulrich Spörlein
c9e1c304c1 Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)

Found by:	clang static analyzer
Reviewed by:	ed
Differential Revision: https://reviews.freebsd.org/D4722
2015-12-29 11:24:41 +00:00
Enji Cooper
0ec7db6428 Fix rtsold's usage message
- Remove -a from the usage message example dealing with specific
  interfaces. -a only makes sense when not specifying an interface,
  such that it's to be run on all interfaces
- Fix the pidfile option (it's -p, not -P)
- Change `interfaces` to `interface` to match the manpage

MFC after: 3 days
PR: 173744
Sponsored by: EMC / Isilon Storage Division
2015-10-30 07:36:43 +00:00
Eitan Adler
463a577b27 Fix a ton of speelling errors
arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Xin LI
56160b2e67 Now that we own the code, use arc4random(3) unconditionally
and remove the corresponding HAVE_ARC4RANDOM conditions.

MFC after:	2 weeks
2015-10-06 23:42:58 +00:00
Hiroki Sato
f74237f5b6 - Remove #ifdef HAVE_POLL_H.
- Use nitems().

MFC after:	3 days
2015-09-10 06:40:28 +00:00
Ed Schouten
a1b862daec Remove bad call to shutdown().
The socket created by rtsol/rtsold is not a connection-based socket,
meaning that we should not attempt to call shutdown() on it.

Reported by:	kan
2015-08-10 07:45:13 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Gleb Smirnoff
0fa5aacd8b Remove #ifdef IFT_FOO.
Submitted by:	Guy Yur <guyyur gmail.com>
2015-05-02 20:31:27 +00:00
Baptiste Daroussin
933095dedc rtsold does not need to link to libkvm 2015-04-09 21:52:14 +00:00
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