Commit Graph

269 Commits

Author SHA1 Message Date
roy
c2e67a9bab Import dhcpcd-6.9.0 with the following changes:
*  Fix IPv6 prefix underflow when confirming deprecated but valid leases
  *  eloop.c and .h are now 100% portable outside of dhcpcd
     (provided the system supports recent POSIX and either you or
     the system provide working TAILQ macros)
  *  Allow waitip to work per interface.
  *  Handle ND options in the same way we handle DHCP and DHCPv6 options.
  *  Add new variable of type bitflags:flags where the flags ABCDEFGH,
     A is 10000000, B is 01000000, etc.
     Variables with the name reserved are no longer processed.
  *  Improve IN_IFF_TENTATIVE with ip sharing.
2015-05-16 23:25:41 +00:00
roy
4d6391b4f4 Sync 2015-05-02 15:18:36 +00:00
christos
6bb2a64eb0 CID 1292550: Missing call to va_end(). 2015-03-31 18:01:09 +00:00
christos
c324220739 more htons uint16_t lossage 2015-03-28 14:16:52 +00:00
christos
305d2d665e cast htons 2015-03-27 18:53:15 +00:00
christos
bc65f041a3 cast htons() args. 2015-03-27 18:51:08 +00:00
roy
a637112937 Crank up the warnings. 2015-03-27 11:35:02 +00:00
roy
868e06c27f Sync 2015-03-27 11:33:46 +00:00
roy
b03ca99758 Sync 2015-03-26 10:26:37 +00:00
roy
dbc46acaa3 Import dhcpcd-6.8.0 with the following changes:
*  Use the exit code of EXIT_SUCCESS when terminating gracefully.
  *  Fix dumping a lease file by filename.
  *  If RTF_LOCAL is defined, don't try and set loopback routes.
  *  Fix adding host routes on BSD.
  *  After adding an address load the kernel routing table for the
     interface. When routes are rebuilt try not to remove any existing
     routes if they don't need changing.
  *  Replace timeval with timespec for our internal functions.
  *  Support kqueue(2).
  *  Better support for more interface types on BSD, thanks to Guy Yur.
  *  Many Prefix Delegation fixes.
  *  Fix creation of normal IPv6 link-local addresses overflowing the
     address storage and fooling dhcpcd into thinking it's not
     tentative when added.
  *  Add own syslog(3) like logging function for a nicer output and so
     we can log to a file for the case when syslogd(8) starts after
     dhcpcd so we can log any errors during system start using the new
     --logfile option.
2015-03-26 10:20:41 +00:00
roy
dc4f241359 Sync 2015-01-30 10:20:43 +00:00
roy
c40a479dcf Sync 2015-01-30 09:47:05 +00:00
roy
b7934c7750 Import dhcpcd-6.7.0 with the following changes:
*  Only release the DHCPv6 lease when dropping it.
  *  Fix handling of ND6_IFF_OVERRIDE_RTADV on BSD.
  *  Include paths.h to get _PATH_BPF. Thanks to Joerg Sonnenberger.
  *  Report a better error of the kernel lacks a BPF equivalent filter.
  *  Implement RFC4941, Privacy Extensions for Stateless Address
     Autoconfiguration in IPv6 when dhcpcd is overriding the in-kernel
     RA support. For BSD, this is a full userland implementation.
  *  reject <option> will now reject any DHCP message that contains
     that option.
  *  Ignore RA's from ourself for very badly configured stations.
2015-01-30 09:40:24 +00:00
prlw1
f44489f8dc MKINET6=no build fixes
http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
2014-12-20 13:15:48 +00:00
roy
a5de07ee00 Make the building of INET optional.
As both INET and INET6 are now options, it's possible to build dhcpcd
without both. When built this way it will just report carrier events.
2014-12-19 10:59:06 +00:00
roy
5de3a50c7e Sync 2014-12-19 10:54:08 +00:00
roy
a850849c48 Sync 2014-12-17 20:50:08 +00:00
roy
c4df7c91c1 Sync 2014-12-09 20:21:05 +00:00
christos
765d671eef avoid macro clash. 2014-12-02 22:13:13 +00:00
roy
c1ce8e7e2b Sync 2014-11-26 16:05:14 +00:00
roy
fd710a4140 Sync 2014-11-26 13:43:06 +00:00
roy
3c322f3bc1 Sync 2014-11-14 12:00:54 +00:00
roy
c38e639c09 Add RCSIDs 2014-11-07 20:51:02 +00:00
roy
3eaad260cb Sync 2014-11-07 20:43:33 +00:00
roy
32584761dd Sync 2014-11-07 20:32:04 +00:00
roy
e2e4bfd1df Sync 2014-10-29 01:08:31 +00:00
roy
61932153cd Sync 2014-10-17 23:42:24 +00:00
roy
77cf2730df Sync 2014-10-06 18:22:29 +00:00
roy
041ac88e49 Import dhcpcd-6.5.0 with the following changes:
*  Fix an unaligned access error on BeagleBone Black with FreeBSD.
     Thanks to Guy Yur for the patch.
  *  Remove the fast loop trying to up an interface which does not
     report carrier.
  *  Remove vis based encoding - instead validate against option type and
     stop at invalid [1]
     This removes all shell escaped encoding - dhcpcd will assume that IF
     the --script option is a shell, it will quote variables correctly.
     The stock dhcpcd-run-hooks does.
  *  dhcpcd -V now prints how the variables will be decoded.
  *  Changed some options in dhcpcd-definitions.conf to more sensible defaults.
  *  Don't daemonise on delegated address dad.
  *  Don't drop delegated reject route when forking.
  *  Fix IPv6 handling of link-local addresses on KAME stacks.
  *  Work on OpenBSD-5.6 without any special interface setup needed.
  *  Callout to handlecarrier when we don't have real carrier support and
     rely on looking at IFF_UP and IFF_RUNNING.
     This allows our hooks to know that dhcpcd thinks we have a carrier or not.

[1] DHCP option encodings defined in dhcpcd-definitions.conf
  *  domain (RFC3397)/dname (string) is strict domain name allowance
     (ie, [alnum] with _- (but not at the start or end))
  *  string is now printable ascii (1-127) until invalid
  *  ascii is all ascii (1-127) until invalid
  *  raw is all chars (1-255) until NUL
  *  binhex is a hex representation of the option including embedded NULs
  *  ssid is still escpaed octal because it's expected to be human readable
     AND can technically be all NUL
  *  everything else has strict option -> value encoding
2014-10-06 18:20:16 +00:00
roy
e3e82f6374 Sync 2014-09-27 11:00:07 +00:00
roy
40dcca62eb Import dhcpcd-6.4.7 with the following change:
*  Fix an impossible analyser error and correctly assign unset iaids.
2014-09-27 10:58:10 +00:00
roy
edf064d2d0 Sync 2014-09-27 01:17:34 +00:00
roy
83f33c897c Import dhcpcd-6.4.6 with the following changes:
*  Detect removal of IPv6 routes
  *  Don't add link-local addresses to POINTOPOINT interfaces
  *  Don't discard expired DHCPv6 leases when dumping them
  *  If a DHCPv6 lease has no timers, expire it right away
  *  Report delegated addresses
  *  Call dhcpcd-run-hooks correctly when delegated prefixes already exist
  *  Fix a memory error when ia_* config exists but IPv6 is disabled
  *  Ensure servername and bootfile are safely exported
  *  Sanitise the following characters using svis(3) with VIS_CTYLE and
     VIS_OCTAL:
         | ^ & ; < > ( ) $ ` \ " ' <tab> <newline>
     This allows a non buggy unvis(1) to decode it 100% and stays compatible
     with how dhcpcd used to handle encoding on most platforms.
     For systems that supply svis(3) there is a code reduction, for systems
     that do not, a slight code increase. This change mitigates systems
     affected by bash CVE-2014-6271 and CVE-2014-7169.
2014-09-27 01:14:51 +00:00
roy
06b615d894 Sync 2014-09-18 20:46:30 +00:00
roy
0d512cb656 Import dhcpcd-6.4.5 with the following changes:
*  Remove all instances of if_indextoname as we already know the index
  *  Check we have allocated IPv6 resources before checkings RA's
2014-09-18 20:43:55 +00:00
roy
f1cbc45c57 Sync 2014-09-16 22:27:04 +00:00
roy
f4cc42a9c0 Import dhcpcd-6.4.4 with the following changes:
*  Many bounds checking fixes from Tobias Stoeckmann
  *  Improve error when the authentication token cannot be found
  *  close the IPv4 specific UDP socket when done sending
  *  Implemented a write queue to the control sockets
  *  Only send interfaces to control sockets when in a BOUND state
  *  Add a sample controlgroup directive to dhcpcd.conf to make setup easier
  *  Add variables if_oneup and if_ipwaited so hook scripts know the overall
     state of dhcpcd better
  *  Pass RC_SVCNAME from enviromment to hooks so that a service hook can
     know it's name (may not be dhcpcd)
  *  Document every variable set for dhcpcd-run-hooks(8)
  *  Allow SSIDs with non printable characters to be used in ssid selection
     in dhcpcd.conf
  *  Add an unprivileged control socket so that normal users can obtain
     dhcpcd running state
2014-09-16 22:23:17 +00:00
roy
648f3093d2 Sync 2014-07-30 15:47:32 +00:00
roy
b15082aeb8 Import dhcpcd-6.4.3 with the following changes:
*  Correct DHCPv6 Prefix Delegation option decoding
  *  Poll interfaces on BSD for IFF_RUNNING if link state cannot be obtained
  *  Check for an IA to use in DHCPv6 lease validation
  *  Warn about exceeding IDGEN_RETRIES when a stable private address cannot
     be obtained
  *  Fix DHCP option overload handling, thanks to Tobias Stoeckmann
2014-07-30 15:44:09 +00:00
roy
8ce36d3976 Remove unused file. 2014-07-14 14:07:02 +00:00
roy
130d37ec50 Import dhcpcd-6.4.2 to fix the building of 6.4.1 2014-07-14 14:02:01 +00:00
roy
1f96c74429 Sync 2014-07-14 11:49:48 +00:00
roy
9d162be235 Import dhcpcd-6.4.1 with the following changes:
*  If just given a domain and no search list, make the search list the domain
  *  Skip arpping directives if we have a profile but not parsing one
  *  Allow the request of a DHCPv6 address or prefix, a prefix length must be
     specified
  *  Add the ability to dump DHCPv6 leases
  *  Improve startup with regards to carrier checking and adding a link-local
     IPv6 address
  *  Start the correct interface reference for added devices
  *  Support
     http://datatracker.ietf.org/doc/draft-ietf-dhc-dhcpv6-stateful-issues-06
     via the ia_pd_mix option
  *  Fix link handling where kernel reported flags in LINK_UP may not be
     valid when we actually process them
  *  Fix defining new options in dhcpcd.conf and requesting them
  *  Fix a potential segfault when reloading configurations
  *  Print user defined options via -V
  *  Add support for RFC6603, Prefix Exclude option
  *  When requesting a IA_PD and another IA type, create a psuedo interface
     to handle the IA_PD
  *  Handle truncated DHCPv6 saved leases
2014-07-14 11:45:02 +00:00
roy
11fd74d7c7 Fix for dhcpcd-6.4.0 2014-06-14 21:00:22 +00:00
roy
1578cb1fcc Sync 2014-06-14 20:55:37 +00:00
roy
a468f856ed Import dhcpcd-6.4.0 with the following changes:
*  Only fork when the RA has a RDNSS option AND a valid prefix OR no DHCPv6 instruction.
  *  Handle BSD per interface rtadv kernel flag.
  *  Add a reject route for the delegated prefix so that unassigned prefixes don't go back upstream.
  *  If not specified, Delegated Prefixes will get an automatic SLA of the interface index. If the biggest SLA and the assigned prefix fits into a /64 then dhcpcd creates a /64 prefix so that SLAAC works. If bigger than /64 is needed then dhcpcd creates one rounded upto the nearest multiple of 8. Unless a configured SLA of 0 is assigned, a reject route for the Delegated Prefix is installed to stop unassigned addresses trying to be resolved upstream. Addresses added from Delegated Prefixes now have a default address suffix of 1 instead of using a SLAAC style address.
  *  Don't spam timezone updates unless its actually changed.
  *  Support ND6_IFF_OVERRIDE_RTADV on BSD.
  *  Document why we don't send both FQDN and hostname options.
  *  Respect RFC4861 MAX_RTR_SOLICITATION_DELAY as specified in section 6.3.7.
  *  RFC2131 section 4.4.1 states the client SHOULD wait a random time between one and ten seconds to desynchronize the use of DHCP at startup. Instead we wait a random time between zero and one second to mirror the more modern IPv6RS and DHCPv6 standards unless overridden by defining RFC2131_STRICT.
  *  Always send a carrier as it's no longer encapsulated in the IPv4 stack. When stopping and not departed, run with the STOPPED reason but do not process it in hooks.
  *  Poll kernel neighbour reachability (SIOCGNBRINFO_IN6) for each router instead of sending and listening for Neighbour Soliciation/Advertisement packets. The kernel is privy to a lot more reachability information than userland is.
  *  Ensure that ND6_IFF_PERFORMNUD is set.
  *  controlgroup option changes group ownership of the control socket.
  *  Should use arc4random_uniform when wanting a randon number between 1 and N. Improve the compat arc4random function a little and re-stir on fork.
  *  -4 and -6 are now mutually exclusive and when running on a single interface per protocol pidfiles are created. This means that other control options suchs as -x and -n will require the -4 or -6 option as well.
  *  Implement Stable Private Addresses for SLAAC as per RFC7217. Enable this as default in dhcpcd.conf.
  *  Log error condition if a new or changed Router Advertisment to avoid spamming the log.
  *  Add an IPv6 link-local address before upping the interface if needed. Bring an interface up when we start it and not during discovery. As such, stop waiting on carrier for a second if we did.
  *  Add gateway option to enable the gateway or an interface/profile. Ensure the option and require options disable the nooption option - last wins.
  *  Restarting ntp/yp are not critical and their initialisation continues in the background as well so we may as well background the restart commands for faster dhcpcd performance.
2014-06-14 20:51:03 +00:00
roy
b7fc208426 Crank up the warnings and fortify the build. 2014-03-22 00:04:51 +00:00
roy
083b63d1f4 Sync 2014-03-14 11:31:11 +00:00
roy
f19170ec2b Import dhcpcd-6.3.2 with the following changes:
* Improvements to autoconf build emulation
  * CARRIER/NOCARRIER are now run outside of the IPv4 runs
  * validate domains correctly which contain a - on non bash shells
  * don't remove IPv6 addresses from internal state when added as tentative
  * HUP now rebinds, ALRM now releases - the -x and -k flags work as
    they used to
  * Add -M, --master option to force dhcpcd into master mode even if one
    interface is specified on the command line
  * Fix a crash when receiving a reconfigure key
  * Dumping a DHCPv4 lease works again
  * SEND_DAD code removed
  * hoplimit is no longer defined for DHCPv6 messages
  * hoplimit of 255 for IPv6 RS/ND message is now defined at the socket
    instead of ancillary data with the message
2014-03-14 11:27:36 +00:00
roy
7c6da338a5 Sync 2014-03-01 11:04:21 +00:00
roy
4595db4b43 Import dhcpcd-6.3.1 with the following changes
* all issuses reported by clang static analyser have been resolved.
2014-03-01 11:00:41 +00:00
roy
41cab36847 Build with FORTIFY_SOURCE 2014-02-25 14:10:09 +00:00
roy
edb7c05f00 Sync 2014-02-25 13:20:23 +00:00
roy
6d5dc1d303 Build new auth modules. 2014-02-25 13:16:04 +00:00
roy
07693f32a1 Import dhcpcd-6.3.0 with the following changes:
* IAID must be inside an interface block.
 * Detect IPv6 address flags on Linux.
 * Check that we have ctrl_interface defined in wpa_supplicant.conf and pass this parameter to wpa_cli(8). If not set, warn about not interacting with wpa_supplicant(8).
 * Skip Virtual Interface Masters. Currently this only applies to FreeBSD VAP masters as dhcpcd should only work on wlandev created clones.
 * Fix handling of ARP failures, thanks to Sebastian Huber.
 * Implement RFC 1321 MD5 Message-Digest if not provided in libc.
 * Implement RFC 2104 HMAC Keyed Hashing.
 * Implement RFC 3118 Authentication for DHCP Messages and RFC 3315 Authentication options.
 * Add nodhcp and nodhcp6 directives. Thanks to Sebastian Huber for the initial patch and testing.
 * Implement support for RFC 3203, FORCERENEW message.
 * Implement Force Renew Nonce Capability option, RFC6704
 * Support RECONFIGURE DHCPv6 messages.
 * Add support for DHCP auto configuration, RFC 2563.
 * Add support for the following RFCs
   + DHCP SLP Directory Agent, RFC2610
   + DHCP Name Service Search, RFC2937
   + DHCP PANA Authentication Agent, RFC5192
   + DHCP Lost Server, RFC5223
   + DHCP CAPWAP, RFC5417
   + DHCP Mobility Services, RFC5678
   + DHCP SIP UA, RFC6011
   + DHCP ANDSF, RFC6153
   + DHCP RDNSS Selection for MIF Nodes, RFC6731
   + DHCP TFTP Server Address, RFC5859
   + DHCP PXELINUX, RFC5071
   + DHCP Access Network Domain Name, RFC5986
   + DHCP Virtual Subnet Selection, RFC6607
   + DHCP Relay Agent Remote-ID, RFC4649
   + DHCP Relay Agent Subscriber-ID, RFC4580
   + DHCPv6 Relay-ID, RFC5460
   + DHCPv6 LIS Discovery, RFC5986
   + DHCPv6 SIP UA, RFC6011
   + DHCPv6 Network Boot, RFC5970
   + DHCPv6 Home Info Discovery in MIPv6, RFC6610
   + DHCPv6 RDNSS Selection for MIF Nodes, RFC6731
   + DHCPv6 Kerberos, RFC6784
   + DHCPv6 Relay-Triggered Reconfiguration, RFC6977
   + DHCPv6 SOL_MAX_RT, RFC7083
 * Open UDP sockets for *.*.*.*:bootpc and $ip_address:bootpc to avoid kernel ICMP unreachable messages
 * Moved global variables into context variables so dhcpcd is entirely thread safe.
   dhcpcd doens't use threads, but it can now be used in a pure threads (ie no process) environment.
 * Remove DEBUG_MEMORY guard and always free memory and resources. Remove all atexit(3) and exit(3) calls, instead exiting via the eloop.
 * Replace get_line with sscanf where applicable.
 * Remove custom set_cloexec and set_nonblock functions. Instead pass O_CLOEXEC or SOCK_CLOEXEC to open, socket, etc.
 * Don't use PATH_MAX - we already know the maximum length from the initial directory and IF_NAMESIZE.
 * Add a USE_SIGNALS define. If we're not using signals then we also create a control socket in the non MASTER case. We then use this to communicate instead of signals.
 * Fix arping moving to the next test if we find the IP address but do not have a profile for it. Thanks to David McGurty for the analysis.
 * Respect initial commandline arguments when rebooting via a signal.
2014-02-25 13:14:27 +00:00
roy
7a87327182 Specify correct run directory.
Fixes PR bin/48529 thanks to martin@
2014-01-17 18:36:25 +00:00
roy
4b2bc9385d Don't enforce rc.d usage in the default build. 2014-01-15 20:58:53 +00:00
roy
8e4e77c750 Sync 2014-01-15 20:43:21 +00:00
roy
6b85057a5c Import dhcpcd-6.2.1 with the folowing changes:
* on BSD only flush RA routers and prefixes when trying to own them.
 * Mark some data locations as read only and fix a build issue.
 * Fix some possible NULL dereferences, CID 1153963.
 * Fix CID: 1153964 and 1153966
 * Add support for RFC3495 DHCP option for CableLabs Clients.
   Note that for the TSP suboption 3 we only support the FQDN encoding.
 * Init system detection moved to dhcpcd-run-hooks(8)
 * Fix compile errors and warnings with IPv6 disabled.
2014-01-15 20:36:31 +00:00
roy
8860784217 Build with dhcpcd-6.2.0 2014-01-03 22:27:31 +00:00
roy
8ad72a7637 Sync 2014-01-03 22:24:41 +00:00
roy
322001baf8 Import dhcpcd-6.2.0 with the following changes:
* Fix NAK backoff when a server NAKs a REQUEST after a DISCOVER.
* Fix IPv6 ICMP filtering on Android (RS/RA now works)
* Fix sending of DHCPv6 FQDN when only hostname specified
* Add support for RFC3925 Vendor-Identifying Vendor Options
* Remove hard coded DHCP/DHCPv6 options and embed dhcpcd-definitions.conf.
  This actually results in a slightly smaller binary than before and has the added advantage that the option definitions are now all held within one file.
* Change IAID to default from the last 4 bytes of the MAC address.
  Rationale in the commit, but in a nutshell it allows for a stable IAID between reboots without persistent storage and across different OS's who name or number it differently to each other.
* RFC4242, Information Refresh Time Option for DHCPv6.
* Fix processing of inet4 addr in vendor options and terminate correctly.
* Preserve vendor encapsulated options.
* Fix renewal of Prefix Delegation. Only spam the log if a lease has a new address or changes the vltime of an existing address.
* Add noipv4 and noipv6 options.
* Warn about missing interfaces which require prefix delegation.
* If we timeout, remove any waitip config so that we daemonise correctly.
* Remove the IPv6 forwarding router check as valid use cases exist where you would want IPv6 RS/RA on a router.
* Pass the correct run directory to dhcpcd-run-hooks
2014-01-03 22:10:42 +00:00
joerg
5d70299db9 NUL != NULL, so use the correct literal 2013-11-18 19:55:29 +00:00
martin
7c50380698 Fix typo in previous 2013-11-14 09:11:39 +00:00
christos
5774707710 CID 1102787: Only copy the interface name if it is NUL terminated, avoiding
a buffer overrun by one in the equals case.
2013-11-14 04:24:33 +00:00
christos
dbb1d6e3ee CID 1102809: Fix uninitialized variable 2013-11-14 01:28:16 +00:00
christos
598bc8c2fc avoid pointer gymnastics 2013-10-20 03:14:34 +00:00
wiz
bd0fe7cd58 Remove trailing whitespace. 2013-09-20 21:40:56 +00:00
wiz
e21b239272 Sort, fix Dt. 2013-09-20 21:39:59 +00:00
roy
4c3f4f7853 Fix building dhcpcd-6.1.0 2013-09-20 10:58:16 +00:00
roy
f6e48aaf0c Sync 2013-09-20 10:56:32 +00:00
roy
71f31e7121 Import dhcpcd-6.1.0 with the following changes:
* Fixed a segfault when configuring a static route in dhcpcd.conf
* Merged IPv6 ND and RA codebases
* Persistent configuration is now a default option in dhcpcd.conf
* Store configured IPv4 addresses against the interface so we only add
  them if actually missing to avoid RTM_DELADDR/NEWADDR loops on some OS's
* waitip now supports waiting for any, IPv4, IPv6 or both protocols
* DHCPv6 addresses are added with a /128 prefix and should not attempt to
  associate with any existing prefix or make one up as per RFC 5942
* Fix initial carrier status
* Fix requesting >1 DHCPv6 address

Fixes PR bin/48140
2013-09-20 10:51:29 +00:00
drochner
4d518571b9 add a patch from upstream, fixing a regression which obstructed link
status detection on BSD virtual interfaces (observed with xennet)
2013-09-11 18:50:00 +00:00
roy
d9c567271e Import dhcpcd-6.0.5
* Fix the domain option (broken in 6.0.4)
 * Don't write a search line in resolv.con if it matches the domain
2013-08-03 10:30:01 +00:00
roy
74f598c53d Sync 2013-07-29 20:39:28 +00:00
roy
cceb514049 Import dhcpcd-6.0.4 with the following changes:
* hostname is not stamped on anymore if already set
* hostname will be set to a FQDN when possible as per RFC4702 section 3.1
* a domain is derived from the FQDN if no domain option is set
* add new hostname_short command to send a short hostname for DDNS
* hostname_fqdn is now documented, along with a new server setting and the
  potential problems associated with it
* the FQDN option is no longer sent by default for DHCPv4 messages
2013-07-29 20:35:31 +00:00
wiz
a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
roy
659620d9e7 Import dhcpcd-6.0.3 with the following changes:
* dhcpcd will now assign a short hostname by default
  To use a FQDN hostname, set this in dhcpcd.conf(5)
  env hostname_fqdn=YES
* Only start DHCPv6 if the RA is new or has changed
* Fixed dhcpcd owning RA addressing and routes if disabled in kernel
2013-07-19 11:52:56 +00:00
roy
25a6200225 Import dhcpcd-6.0.1 with the following change:
* Fix a compile issue on Big Endian machines
2013-06-22 09:25:33 +00:00
roy
2dcb1b8756 Add the timezone hook 2013-06-21 21:09:34 +00:00
roy
8080c8ffc5 Build dhcpcd-6.0.0 2013-06-21 19:47:29 +00:00
roy
8891301a03 sync 2013-06-21 19:40:20 +00:00
roy
d407ff275f Import dhcpcd-6.0.0 with the following changes:
* DHCPv6 support
 * wpa_supplicant hook script
 * route IPv4 addresses to 127.0.0.1 for machine centric traffic
 * DHCPv6 Prefix Delegation support
 * DHCPv6 FQDN support
 * Control existing IPv4 routes
 * less spamy to syslog by default
 * IPv6 protocols now wait for a valid LL address before starting
 * IPv6 DAD support now listens to kernel for more accurate timings
 * IPv4 code split out more cleanly so dhcpcd can be compiled for
   IPv4, IPv6 or IPv4 AND IPv6
 * MTU is no longer requested by default
 * a DUID is now generated in /etc/dhcpcd.duid and this is used as a
   client ID for DHCPv4 and DHCPv6
   This does mean that you may get new DHCPv4 addresses

Many bugs have also been fixed along the way and this release addresses
the following PR's

PR bin/47364
PR bin/47502
PR bin/47666
PR bin/47699
PR bin/47775
PR bin/47776
2013-06-21 19:33:06 +00:00
roy
2d64930a6b Sync 2013-01-28 15:46:52 +00:00
roy
9fd5edf906 Import dhcpcd-5.6.7 with the following changes:
* Preserve space in static routes on the command line.
* Check correct interface the RAP came from; fixes PR bin/47433 thanks to
  Taylor R Campbell
* Ensure the nooption works for IPv4 routes
2013-01-28 15:45:10 +00:00
roy
0cad70d023 Sync 2012-12-19 09:43:31 +00:00
roy
8495b41193 Import dhcpcd-5.6.6 with the following changes:
* Grow -4, --ipv4only and -6, --ipv6only options
* Respect AUTO and ONLINK flags for each prefix in the RA
2012-12-19 09:41:09 +00:00
roy
a6e5712818 Sync 2012-12-06 11:16:47 +00:00
roy
b84abd3f0f Import dhcpcd-5.6.4 with the following changes:
* add interface scope to exported IPv6 link local addresses
* DUID feature works again
* If we receive >1 MTU in the RA we use the last one
* Expire RA options separately from the RA
* Merge multiple RA options together except when a single is needed
* Some memory leaks plugged
* Don't overwrite invalid memory when DNSSL options begin with a NULL
* Ensure we have a large enough buffer for an escaped DNSSL option from RA
2012-12-06 11:11:35 +00:00
joerg
ed602fb487 Don't use const foo const as type, one const is enough. 2012-09-13 21:44:49 +00:00
roy
363f3bbd25 Import dhcpcd-5.6.2 with the following changes:
Disable kernel RA earlier on Linux
* Don't set if_up or if_down as true when testing
* ra%d_prefix is now a space separated array of the finished address/len
* If we fail to open sockets, don't bother sending the request
* Send our NS solicitation directly to the router
* Change the NS times so that we assume reachable until the reachable time
  expires, then send probes at retrans intervals until
  DELAY_FIRST_PROBE_TIME is reached at which point we expire the router
* Remove -v from --version in usage
* Only add our own host or destination routes to the build table when we
  are adding gateways
* Ensure we have correct memory allocation for each prefix in the RA
2012-09-03 09:46:12 +00:00
roy
9535b4e814 Workaround libc not exporting in6addr_any when built with MKINET6=no. 2012-08-04 19:11:39 +00:00
roy
88e1863871 Fix for dhcpcd-5.6.1 2012-07-12 16:54:14 +00:00
roy
b36ce22b1f sync 2012-07-12 16:51:21 +00:00
roy
b2b2e70f68 Import dhcpcd-5.6.1 with the following changes:
Improve IPv6 RA support by allowing dhcpcd to manage addreses and
routes instead of the kernel. dhcpcd will only do this if RA has been
disabled in the kernel or instructed to do so via the dhcpcd.conf(5)
ipv6ra_own and/or ipv6ra_owndefault directives.

Send and process IPv6 Neighbor Solicitions and Adverts to prove router
reachability. If a router cannot be reached in this way then it is
expired.
2012-07-12 16:47:58 +00:00
roy
f08761da93 * Fixed a potential segfault with IPv6 option handling
* Add a suffix to all our config files so that RA never stamps on IPv4
* All valgrind errors fixed on FreeBSD (with ./configure --debug=YES)
* When started with an interface list, respect that with signal handling
* Fix a potential route table corruption if we failed to add a route
2012-03-28 10:19:31 +00:00
wiz
3315c81aec Comment in --version description. It works, it's just not in the getopt
array.
2012-03-23 20:49:05 +00:00
wiz
fabe784d6c Sort short options in SYNOPSIS. 2012-03-23 12:35:59 +00:00
wiz
47a539e56a Comment out --version in SYNOPSIS as well. 2012-03-23 12:33:43 +00:00
wiz
2086942ea5 Fix Dd and Dt arguments.
New sentence, new line.
Sort options and option descriptions.
Sort SEE ALSO.
Use Fl Fl for long options.
Comment out --version description which binary doesn't support.
2012-03-23 11:19:18 +00:00
wiz
16fc69f4fa Fix Dt argument. 2012-03-23 11:18:30 +00:00
roy
1579ddfabe Sync 2012-03-23 09:40:18 +00:00
roy
0ddbb53364 Import dhcpcd-5.5.5 with the following changes:
* We store the RA against the interface so we can do a comparsion
  so we don't spam the log frequently.
* By default only fork on RA if it has a valid RDNSS option
* Add .Lk macros to the man pages
* Use correct event loop calls in RA handling code
* Fix several memory overrun issues
* Use CSR more than once
* Allow operation on Bridge and VLAN interfaces
2012-03-23 09:39:14 +00:00
roy
50f757f219 Remove stale files from older imports. 2012-02-06 17:47:26 +00:00
roy
b6ecb9d5dd Import dhcpcd-5.5.4 with the following changes:
* Disregard IFF_RUNNING on link state changes
* Warn about the kernel not configured for IPv6 RAs instead of
  complaining it can't send messages

OK: releng@
2012-02-06 15:56:58 +00:00
roy
75c7a95f02 Import dhcpcd-5.5.3 to fix a compile failure. 2012-02-03 00:04:06 +00:00
roy
54e74c5d9b Import dhcpcd-5.5.2 with the following changes:
* Stop checking IFF_RUNNING in RTM_IFINFO in an unknown link state
* RA expiry now tiggers off the first option if newer than the prefix
* Prefer a DHCP lease over an IPv4LL one
2012-02-02 23:35:40 +00:00
roy
5c9f9c92ee Import dhcpcd-5.5.1 with the following changes:
* Don't start IPv6 RS if disabled globally
* Allow dhcpcd to run on a read only filesystem
* Don't attempt to run the script if an empty string or /dev/null
* Stop truncating the netmask sockaddr on routing messages for BSD
2012-01-31 09:39:47 +00:00
roy
4f23fde8b3 Fix for IPv6 RS support. 2012-01-25 14:39:05 +00:00
roy
c59dcc5ba2 Sync 2012-01-25 14:34:31 +00:00
roy
35102f5b06 Import dhcpcd-5.5.0 with the following changes:
* Shell portability fixes, including proper printf usage.
* Detect a valid ntp.conf before adjusting it
* reboot timeout changed to 5 seconds
* When rebooting and not daemonized, reduce the discover timeout
  to allow for fallback or IPv4LL
* Respect each kernel carrier message
* Optimize some bitwise logic
* Don't remove interfaces for which commands have not been sent
* Store the assigned metric to each route so that we can change metrics on the fly
  dhcpcd -n --metric 100 iwi0
* Add SixRD support, RFC5969
* Fix SIP server support
* Only regen resolv.conf if it has changed
* Fix --reconfigure from spinning
* Add IPv6 Router Solicitation support we regards to RDNSS and DNSSL, RFC6016
2012-01-25 14:33:03 +00:00
roy
e21138bdbf Sync 2011-04-06 09:09:05 +00:00
roy
a2af890d85 Import dhcpcd-5.1.12 with the following changes:
* 20-resolv.conf now uses the correct variable for $IF_METRIC
* Exclude interface values when dumping the lease
* Parse static value subnet_mask when it exists instead of deriving from
  ip address
* logger calls now resemble dhcpcd calls to syslog(3)
* Reject offered IP address if INADDR_BROADCAST or INADDR_ANY
* Change the route if source address has changed
* Note the address we are requesting in the broadcast log entry
* When operating on one interface, respect the timeout for in dhcpcd.conf
* Escape | and & characters before passing the value to the shell
  Ensure we set a valid hostname, DNS domain and NIS domain.
  Document the need for input validation in dhcpcd-run-hooks(8).
  Fixes CVE-2011-996
  Based on a patch to dhcpcd-3 by Marius Tomaschewski <mt@suse.de>
2011-04-06 09:06:41 +00:00
wiz
b7b9012e09 Fix typo, already reported to roy@ 2011-02-04 16:30:32 +00:00
roy
9bcc7aaf5d sync 2011-02-04 15:03:14 +00:00
roy
d70ff484b5 Import dhcpcd-5.2.11
Change from dhcpcd-5.2.10 is a fix for the new routing sockets.
2011-02-04 15:00:22 +00:00
roy
160a96b3e7 Don't build the getline shim anymore as the NetBSD libc getline(3) has
proven itself now.
2011-01-03 11:33:44 +00:00
roy
0524c4d0bb Import dhcpcd-5.2.10 with the following change:
* -r, --request <address> now works again
2011-01-03 11:28:23 +00:00
roy
04e42faa8e Install the 02-dump hook for dhcpcd. 2010-11-27 12:11:54 +00:00
roy
ff707c5c61 sync 2010-11-27 11:28:24 +00:00
roy
0632cf1e32 Import dhcpcd-5.2.9 with the following changes:
* syntax in 50-ypbind hook has been fixed
* man page corrections
* report hwaddr used by dhcpcd when debug is enabled
* Fix detecting inet address for INFORM support
* document reason RELEASE in dhcpcd-run-hooks
* Support RTM_CHGADDR in the upcoming NetBSD-6
  This is used to work out if the hwaddr has changed as the interface
  does not go down/up unlike other OSes
* ntp hook no longer attempts to restart ntpd if 1st attempt failed
2010-11-27 11:24:09 +00:00
roy
c1259c9577 Put correct init.d hooks into dhcpcd-run-hooks. 2010-11-10 14:12:28 +00:00
roy
2b71ad63d1 Sync 2010-10-07 14:38:10 +00:00
roy
ada0026e42 Import dhcpcd-5.2.8 with the following changes from 5.2.4
* Use dynamically sized buffers for reading kernel link events
* Use the active link address
* Added option to dump a lease to stdout
* TEST mode now works correctly if an old lease is NAKed
* routes with the gateway = leased ip are now treated as host routes
2010-10-07 14:35:56 +00:00
roy
e0a4f5bfed Import dhcpcd-5.2.4 with the following changes:
* Fix crash when using clientid and the interface re-configures
* log the pid of dhcpcd
* Indicate server IP received message from even if server ID not
  present
* Fix crashes on IPv4LL failure and add more logging
2010-06-04 09:07:59 +00:00
roy
72889e7367 Import dhcpcd-5.2.2 with the following changes:
* Don't send a maximum DHCP message size beyond what we can handle.
* ip_id is now randomized.
* IPTOS_LOWDELAY and IP_DF flags are no longer set.
2010-03-31 09:14:47 +00:00
roy
4d83beb44b Import dhcpcd-5.2.1 for a build fix 2010-02-27 16:02:25 +00:00
roy
3818f326d9 Include platform.c 2010-02-27 15:55:09 +00:00
roy
0df03e9fd9 Import dhcpcd-5.2.0 with the following changes from dhcpcd-5.1.5:
* VendorID is now dhcpcd-$version:$OS-$version:$machine:$platform
* IPv4LL address range can now be used in DHCP requests
* sysctl net.ipv4.conf.$iface.promote_secondaries enabled on Linux
  This resolves a long standing issue of changing ip on the same subnet.
* IPv4LL correctly resets the DHCP timer.
2010-02-27 15:52:20 +00:00
roy
afee245092 sync 2010-01-31 20:53:05 +00:00
roy
a7622e5331 Import dhcpcd-5.1.5 with the following changes:
* -H, --xidhwaddr uses the last 4 bytes of the hardware address as
  the DHCP xid
* -J, --broadcast tells the DHCP server to broadcast replies
* no longer warn about InfiniBand being an unsupported family
* infinite lease times are valid when reading old leases
* discard address correctly if lease is invalid
2010-01-31 20:50:16 +00:00
roy
5f8a05b17d Import dhcpcd-5.1.4
Changes from dhcpcd-5.1.3 include:
 * dhcpcd logs even in quiet mode.
 * Sleep for 1/100th of a second to give time for kernel to send RELEASE.
 * -S option now works.
 * Only warn about using CSR on bind.
2009-12-23 08:30:06 +00:00
roy
0c8963a482 Sync with import 2009-10-25 23:35:41 +00:00
roy
ffe854671a Import dhcpcd-5.1.3 with the following changes:
* waitip is enabled when running on a single interface.
* Classless Static Routes are now enabled by default in dhcpcd.conf
  instead of being always being requested.
2009-10-25 23:27:30 +00:00
roy
1a80e629b5 Remove mistakenly added file. 2009-10-16 23:57:39 +00:00
roy
f09bb2caf5 Sync 2009-10-16 21:57:54 +00:00
roy
3b87816311 Import dhcpcd-5.1.2 with these changes:
* ClientID is now reported when interface starts.
* -w, --wait forces dhcpcd to wait until an interface gets a lease or
  times out.
* Ensure DHCP socket is open when sending a DECLINE.
* Uses new hwaddr if existing interface is downed and then changed.
* No longer works on firewire interfaces by default.

dhcpcd-5.1.2 has a new behaviour change - when starting up and at least 1
interface has a carrier then it tries to get a lease or times out.
It still daemonises regardless. This, along with the -b and -w flags
allows total control over the desired behaviour of dhcpcd.
2009-10-16 21:50:41 +00:00
roy
9f9d7a83f9 Fix building dhcpcd-5.1.1 2009-10-02 21:40:16 +00:00
roy
0b3ae6da92 Add back dhcpcd.conf 2009-10-02 21:36:41 +00:00
roy
cc2e8e7e32 Import dhcpcd-5.1.1
Changes from dhcpcd-5.0.7 include
* Only allow hardware families we know by default (over-ridable)
* Fix persistent and timeout 0 options
* Fix parsing of escape code sequencies
* Don't bring up interfaces brought down when handling new interfaces
* Allow un-encapsulated vendor option
* Don't null terminate gratuitously when handling quotes
* Fix various typos and grammatical errors
* dhcpcd.conf simplified a little
2009-10-02 21:31:01 +00:00
sborrill
51827ae696 Fix various typos and grammatical errors 2009-09-16 19:04:01 +00:00
roy
1eb42625ea Import dhcpcd-5.0.7
Changes from dhcpcd-5.0.6 include:
* Fix -f path/to/config
* -e, --env var=value for profile specific env vars
* Many issues resolved when running in test mode
* Don't print a (null) string when there is no NAK message
* read ssize_t instead of size_t when checking signals
2009-07-28 20:53:17 +00:00
roy
b1b5513e68 Update to dhcpcd-5.0.6
Changes from dhcpcd-5.0.5 include
 * Fix crash on MIPS, fixes PR bin/41682
   Thanks to Tim McIntosh <tmcintos@eskimo.com> for the patch
 * Save and restore interface MTU when changing
 * IP whitelist
 * Ensure that the lease and pidfile directories exist at startup
2009-07-08 22:33:21 +00:00
roy
8c75820385 Sync 2009-07-03 22:20:09 +00:00
roy
a0cd7e431b Import dhcpcd-5.0.5
Changes since 5.0.4
 * Fixed dstaddr detection for PtP links at startup
 * Default to requesting MTU in dhcpcd.conf
2009-07-03 19:39:25 +00:00
christos
477a0ba90e Add an NetBSD id for ease of maintenance. 2009-06-01 19:07:55 +00:00
roy
539e10cf4e Import dhcpcd-5.0.4
Changes from dhcpcd-5.0.3 include
 * ServerID requirement in DHCP messages can be toggled in dhcpcd.conf
 * If MTU is requested, don't apply if less than 576
 * Enforce a minimum lease time of 20 seconds
2009-05-14 16:25:55 +00:00
roy
cd5cb024ed Import dhcpcd-5.0.3
Changes from 5.0.2
 * Fix crash when ifa_addr from getifaddrs(3) is NULL
2009-05-11 08:52:46 +00:00
roy
ed7c19b672 Re import right version 2009-05-10 17:20:55 +00:00
roy
05cc3e1e56 Update dhcpcd to 5.0.2
Changes from 5.0.1 include
 * -n option now starts dhcpcd if not already started
 * 29-lookup-hostname hook installed by default, but skipped in dhcpcd.conf
 * Fix warning about missing dirs if we don't have any existing state
 * Fix compile on some Linux distros re linux/wireless.h
2009-05-10 16:44:26 +00:00