Commit Graph

20 Commits

Author SHA1 Message Date
pfg
872b698bd4 General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
glebius
78d51c7b15 Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
hrs
13c1bcf2c1 - 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
eadler
076d9b3125 Fix a typo in an error message.
Obtained From:	DragonFlyBSD (commit 66e72101cc32272ae370b895ca3d9e3e99c5c3a8)
2013-05-06 17:21:28 +00:00
hrs
cdcbea6ad2 - Refactoring the interface list. It now supports dynamically
added/removed interfaces in a more consistent manner and reloading
  the configuration file.

- Add initial support for control socket.  RA information in the
  daemon can be obtained by rtadvctl(8) instead of SIGUSR1 in a similar
  manner to ifconfig(8).  The information dump has been removed in favor of it.

  (reload the configuration file)
  # rtadvctl reload

  (show RA messages being sent on each interfaces)
  # rtadvctl show
  em0: flags=<UP,CONFIGURED,PERSIST> status=<RA_SEND> mtu 1280
        DefaultLifetime: 30m
        MinAdvInterval/MaxAdvInterval: 3m20s/3m20s
        AdvLinkMTU: <none>, Flags: O, Preference: medium
        ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64
        AdvIfPrefixes: yes

  (show RA messages being sent only on em0)
  # rtadvctl show em0

  (rtadvctl -v show provides additional information)
  # rtadvctl -v show em0
  em0: flags=<UP,CONFIGURED,PERSIST> status=<RA_SEND> mtu 1280
        DefaultLifetime: 30m
        MinAdvInterval/MaxAdvInterval: 3m20s/3m20s
        AdvLinkMTU: <none>, Flags: O, Preference: medium
        ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64
        AdvIfPrefixes: yes
        Prefixes (1):
          2001:db8:1::/64 (CONFIG, vltime=30d, pltime=7d, flags=LA)
        RDNSS entries:
          2001:db8:1::128 (ltime=2m40s)

  (stop rtadvd)
  # rtadvctl shutdown

  A remaining issue when reloading the configuration file is that
  during that period rtadvd cannot communicate with rtadvctl due to some
  additional RA sending for graceful shutdown.  This will be fixed later.
2011-07-14 10:09:58 +00:00
hrs
6bc38bb776 Fix various inconsistencies in symbol naming and data handling which
made the logic behind them unnecessarily complicated.  This change is
a preparation to add support of dynamically-added/removed interfaces and the
link status changes in a more reliable way.  Changes include:

- Use queue(3) for linked-list manipulation.
- Use consistent variable names.
- Use (AF_INET6, s, d, sizeof(d)) instead of (AF_INET6, s, a, INET6_ADDRSTRLEN)
  for inet_ntop().
- style(9) fixes.

No functional change in this commit.
2011-06-04 16:42:51 +00:00
hrs
00e43e0cd5 - Fixes for WARNS=6.
- Use IFNAMSIZ for an interface name.
2011-06-04 02:51:12 +00:00
hrs
d3d16bccfc - Use IANA reserved example.com domain for rtadvd.conf(5).
- Fix 8-octet boundary calculation.  Extra 8 octets were added when it was
  already on an 8-octet boundary.
- Typos and style(9) fixes.

Submitted by:	bz
2011-06-04 01:20:47 +00:00
hrs
bf953fdd57 - Remove #ifdef RDNSS.
- Style(9).
- Define sin6_{linklocal,sitelocal}_all{nodes,routers} vars consistently.
2011-05-31 12:54:32 +00:00
hrs
fd7e38fffc Implemnt 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.  Lifetime handling is not supported at this
moment.

Note: when receiving a link-local scope address rtsold(8) adds a scope
id into addresses in the script arguments based on the received
interface in a representation defined in RFC 4007 (e.g. fe80::1%bge0).
However, there are some shell scripts using printf(1) (including
resolvconf(8)) cannot process it properly because printf(1) can
recognize the character % as special.

Based on work by:	J.R. Oldroyd
PR:			kern/156259
2011-05-29 05:24:58 +00:00
imp
8391d4689d Properly convert bit value to a bit field. Before we were storing
values like 0x80 or 0x40 into a uint8_t foo:1 bitfield.  This would
result in the bit always being 0.  One of these caused a warning for
overflow (one that was 0x80), but the other didn't.  They were both
wrong.

This is why I hate code that mixes c struct bitfields and #defines.
The rest of the fields accessed by the program should be audited.
2009-02-19 16:30:11 +00:00
bde
7432091236 Fixed a misspelling of 0 as NULL. 2004-03-10 08:46:39 +00:00
ume
a3738aa5cf reduce #ifdef.
MFC after:	1 week
2003-08-11 15:51:54 +00:00
ume
958362f6a8 KNF, correct typos and cleanup spaces.
Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:56:01 +00:00
ume
52b4a696e0 __FUNCTION__ --> __func__
Obtained from:	KAME
MFC after:	1 week
2003-08-08 16:38:23 +00:00
ume
832f8d2249 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
itojun
a458f7bcea make it easier to handle $FreeBSD$ tags (amount of diff matters). 2001-01-21 15:25:46 +00:00
kris
be25e6d5a3 Sync with latest KAME
Obtained from:	KAME
2000-07-05 22:09:50 +00:00
shin
48f6832d33 Added several socket close() which were mistakenly forgotten.
Reported by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
2000-03-09 14:51:05 +00:00
shin
9b5932fc47 libipsec and IPsec related apps. (and some KAME related man pages)
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
2000-01-06 12:40:54 +00:00