Commit Graph

48 Commits

Author SHA1 Message Date
roy 9c9a1de605 Sync 2016-04-10 21:00:53 +00:00
christos 65da133ce8 Handle static routes in IPv4. Routing messages for static routes have a
gateway address of AF_INET, not AF_LINK. Find the interface for that gateway.
XXX: We need to do the same for IPv6...
2016-02-01 16:47:00 +00:00
roy 26d95753d3 Sync 2016-01-07 20:09:43 +00:00
roy 2d980baa58 Sync 2015-11-30 16:33:00 +00:00
roy 33ca8eec34 Remove unused variable. 2015-08-21 13:24:47 +00:00
roy d5314d23aa Sync 2015-08-21 10:39:00 +00:00
roy 76ccb05303 Sync 2015-07-09 10:15:34 +00:00
roy 7fd072243f Sync 2015-05-16 23:31:32 +00:00
roy 4d6391b4f4 Sync 2015-05-02 15:18:36 +00:00
christos bc65f041a3 cast htons() args. 2015-03-27 18:51:08 +00:00
roy b03ca99758 Sync 2015-03-26 10:26:37 +00:00
roy c40a479dcf Sync 2015-01-30 09:47:05 +00:00
roy a850849c48 Sync 2014-12-17 20:50:08 +00:00
roy c38e639c09 Add RCSIDs 2014-11-07 20:51:02 +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 edf064d2d0 Sync 2014-09-27 01:17:34 +00:00
roy 06b615d894 Sync 2014-09-18 20:46:30 +00:00
roy f1cbc45c57 Sync 2014-09-16 22:27:04 +00:00
roy 1f96c74429 Sync 2014-07-14 11:49:48 +00:00
roy 1578cb1fcc Sync 2014-06-14 20:55:37 +00:00
roy 083b63d1f4 Sync 2014-03-14 11:31:11 +00:00
roy edb7c05f00 Sync 2014-02-25 13:20:23 +00:00
roy 8ad72a7637 Sync 2014-01-03 22:24:41 +00:00
christos 598bc8c2fc avoid pointer gymnastics 2013-10-20 03:14:34 +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
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 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 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
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
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 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 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 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 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 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 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 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 8804666dc4 Import dhcpcd-5.0.1
Changes from dhcpcd-5.0.0
 * Silence compile warnings on Sparc64
 * Fix existing address detection
2009-05-03 06:48:58 +00:00
roy 2158200f72 Import dhcpcd-5.0.0
Major changes from dhcpcd-4 include
 * Single daemon can now run DHCP on multiple interfaces at the same time
 * Configuration profiles per interface, ssid, arping and fallback
 * Listens to 3rd party programs changing routing information
 * Supports DHCP INFORM over PPP
 * Can configure static options for destination address
 * Control socket so 3rd party program can control or listen directly
   to dhcpcd events
 * Is also a BOOTP client
2009-04-28 22:14:20 +00:00
roy 98454aa775 Import dhcpcd-4.0.7 with the following changes from dhcpcd-4.0.1
DHCP_DECLINE now includes the IP and Server in the message.
Trailing NULLs are stripped from string options.
ntpd is only restarted if it is already running.
ClientID is no longer sent by default.
CSR comes before routers and static routes as per RFC 3442.
Host routes are now added correctly.
If a the interface link flaps but status does not change, do not reset the timer.
2008-12-09 19:34:58 +00:00
joerg b2f096aeb9 Import dhpcd-4.0.0rc3. Major changes since beta4:
- support for link state notification (e.g. renew lease after carrier
  returned)
- support to start go into background immediately
- don't cleanup interface state. dhcpcd will leave the interface in the
  same state as before if the lease uses separate addresses. -p still
  stops it from removing the configured address on exit
- various smaller bugfixes, optimisations and cleanups
2008-07-27 18:06:30 +00:00