Commit Graph

197 Commits

Author SHA1 Message Date
roy
d92ae095f2 Import dhcpcd-7.0.0 with the following changes:
*  dhcp: when unicasting on L3, unicast on L2 as well
  *  dhcp: when rebooting, don't set cidaddr
  *  dhcp6: don't listen on IPv6 addresses when not using DHCPv6
  *  dhcp: only set probe state when probing (fixes REBOOT reason)
  *  ipv6: disable kernel RA if interface is active
  *  hooks: set protocol to link for link layer events
2018-01-01 11:48:51 +00:00
roy
c378917b11 Sync 2017-12-06 10:35:05 +00:00
roy
ffdc9e0056 Import dhcpcd-7.0.0-rc4 with the following changes:
*  Don't flush prefix routes/routers if kernel does not support RA
  *  dhcp: improve errors around UDP checksum failure
  *  dhcp: announce existing addresses before rebooting
  *  bpf: rework loop so that we can close/reopen fd inside and abort
  *  ipv6nd: don't handle NA/RA for non active interfaces
  *  dhcp6: listen on all addresses in non master mode
  *  dhcpcd-run-hooks: set protocol in dhcpcd, don't guess
  *  Ensure that xid is unique across all interfaces
  *  dhcp6: redirect message to interface which uses the xid
  *  bsd: strip scope from LL addresses when detecting their addition
  *  ipv6nd: fix address lifetime overflow on carrier up
  *  dhcp6: fix confirmation of lease on carrier up
2017-12-06 10:33:29 +00:00
roy
eea0c4791a Cleanup 2017-10-08 09:10:11 +00:00
roy
3c389f9623 Remove mistakenly commited debug. 2017-10-07 14:14:40 +00:00
roy
ec1306698f dhcpcd no longer needs hmac_md5.c 2017-10-07 14:11:07 +00:00
roy
d8819cfad2 Import dhcpcd-7.0.0-rc3 with the following noteable changes:
*  Fixed handling RA's from multiple routers
  *  Fixed changing to a better route based on gateway
  *  IPv6 default route is now deleted when config is not persistent
  *  Use hmac(3) if available in libc to reduce binary size

Fixes PR bin/52554
2017-10-07 14:05:36 +00:00
roy
4777372b1e Sync 2017-09-19 19:19:21 +00:00
roy
2e864d58b0 Import dhcpcd-7.0.0-rc2 with the following changes:
*  dhcp: fixed classless static routes
  *  prefix delegation: build routes after assigning addresses
  *  dhcp: on lease expiration, discover only when carrier
  *  ip6: fix potential segfault when lifetime overflows
  *  dhcp: fix reporting of DNS encoded SIP servers
  *  dhcp6: fix unicast in non master mode
2017-09-19 19:16:48 +00:00
bsiegert
1eb43387d0 dhcp: Fix classless static routes
Assign the netwask correctly from the message.

Cherry-picked from upstream in
https://dev.marples.name/rDHC510c760cb24ef4b1b16cc14732c5ffe0fbb0d96d.

This fixes route assignments when running on Google Compute Engine,
which uses classless static routes.
2017-09-05 11:58:55 +00:00
roy
071e94d506 Sync 2017-05-10 11:03:44 +00:00
roy
a38988a026 Import dhcpcd-7.0.0-rc1 with the following changes:
*  Default to use VLANID>0 for IAID instead of MAC address
  *  Stop sharing the DHCPv6 port in master mode with other processes
  *  Fix some prefix delegation issues when the carrier drops or
     addresses become stale
  *  Fix a crash when starting dhcpcd with -n
  *  Fix test for preferring a fake lease over a real one
  *  Show to real address lifetimes being added when adding IPv6
     addresses
  *  Restore the -G, --nogateway option
2017-05-10 11:00:37 +00:00
roy
4589239c13 Sync 2017-04-14 09:56:32 +00:00
roy
f85b60c0ae Import dhcpcd-7.0.0-beta3 with the following changes:
*  restored --logfile support as a few people complained it vanished
     The new logging code even makes the overall binary size smaller
     on most platforms.
  *  BPF filter now trims garbage trailing the payload
     OK, it's not garbage, but userland doesn't know some drivers append
     FCS to it.
  *  support NetBSD's RO_MSGFILTER socket option to reduce avoid context
     switching for route(4) messages that don't interest us.
  *  Don't open sockets if just sending signals.
  *  HMAC-MD5 test's now check expectations in code rather than relying
     on visual confirmation.
  *  added eloop-bench to test performance of eloop with available
     polling mechanisms.
2017-04-14 09:53:06 +00:00
christos
8bf0b7f8c5 The last stderr message felt lonely and committed suicide. 2017-04-06 14:01:27 +00:00
christos
bcf59e7932 transposition police! 2017-04-06 14:00:34 +00:00
christos
55498c5a44 delete extra file 2017-04-05 21:26:30 +00:00
kamil
96ab71d5fd Try to fix build of dhcpcd (bpf.c) - violation of stack protector (GCC)
Patch obtained from <roy>
2017-04-03 00:42:20 +00:00
roy
82ffdd577c Import dhcpcd-7.0.0-beta2 with the following changes:
*  Builds without AUTH now compile.
  *  Builds without IPv4LL now compile.
     Thanks to Joerg Sonnenberger.
  *  BPF no longer uses a variable length buffer for stack protector.
  *  Minor documentation fix for duid file location.
     Thanks to Peter Colberg.
2017-04-02 18:54:19 +00:00
roy
e07358adc1 Sync 2017-03-31 20:53:55 +00:00
roy
8fd57d42c7 Import dhcpcd-7.0.0-beta. Changes from prior version include:
*  source file locations reworked:
       dhcpcd source is in src
       dhcpcd hooks are in hooks
       compat is in compat
  *  README split into README.md and BUILDING.md
  *  internal routing is now protocol agnostic
  *  avoid using __packed and use compile time asserts instead
  *  addresses some alignment issues
  *  disable some ARP code on kernels which support RFC5227
  *  BSD IPv6 kernel settings are now updated to reflect dhcpcd config
  *  custom logger has been removed, syslog handles everything
     as such, the --logfile option has been removed as well.
     If you need better/earlier logging, get a better syslogger!
  *  distinfo and signed distinfo files are now available alongside
     release taraballs from this point onwards
  *  default DBDIR has changed from /var/db to /var/db/dhcpcd
  *  /etc/dhcpcd.duid moves to DBDIR/duid
  *  /etc/dhcpcd.secret moves to DBDIR/secret
  *  lease file names have dhcpcd removed from them as they are now
     inside a directory of the same name
  *  fixed issues with reject routes not working on some platforms
  *  improved nl80211 support on Linux for working out the SSID
  *  no longer request NTP by default in dhcpcd.conf
  *  BPF filtering vastly improved so dhcpcd only wake up on
     ARP or DHCP packets destined for it
  *  support for MUD URL (draft-ietf-opsawg-mud-05)
  *  if the kernel isn't doing DAD, don't insist on waiting for it
     to actually do it
  *  fix a potential crash where the DHCP or ARP states could be
     freed before the packet processing loop naturally breaks
  *  removed gateway and nogateway options
     (these can be controlled by the nooption directive which
     works for more than just gateways)
  *  removed ipv6ra_own and ipv6ra_own_default options
     (these can be controled by the ipv6rs/noipv6rs directive)
  *  fix a crash receiving SIGUSR1
2017-03-31 20:51:14 +00:00
abhinav
8d3dde9add Fix typo: s/obtaind/obtained 2017-01-23 11:18:02 +00:00
abhinav
b21f38a299 Fix several typos. 2017-01-23 11:09:14 +00:00
abhinav
c96e8d55f0 Fix typo: s/Unpriviledged/Unprivileged 2017-01-23 10:50:11 +00:00
christos
d5970ab2da make DEBUG_NS compile. 2016-10-09 19:38:08 +00:00
roy
a94cf675a8 Sync 2016-10-09 09:18:26 +00:00
roy
90f85a50d4 Remove files from botched import 2016-10-07 09:38:10 +00:00
roy
b2a8abed61 Import dhcpcd-6.11.4 with the following changes:
*  Fixed octal and hex string parsing in options.
  *  Several statically sized buffers have been removed and replaced
     with dynamically sized ones where we have no real idea of what
     the size will be.
  *  Reverse IPv4 route removal order.
  *  Added --small configure directive to reduce binary size
  *  Allow DHCPv6, IPv4lL and authentication to be compiled out
  *  Add support for ifa_addrflags in getifaddrs(3)
  *  Add support for ifam_addrflags and ifam_pid from route(4)
  *  If T1 or T2 are not set in DHCPv6 messages, use a default from the
     lowest pltime instead of the expiration time.
  *  Validate lease before moving to REQUEST when both ends use
     rapid commit.
  *  If lease validation fails, don't restart the DISCOVER phase if
     we're already in it.
2016-10-07 08:36:16 +00:00
christos
9acd45d4f4 provide a NO_AUTH option to strip auth for boot media; saves around 40K. 2016-09-18 15:37:23 +00:00
roy
df5ed7c4f2 Sync 2016-08-15 11:04:53 +00:00
roy
3799d64d34 Sync 2016-07-29 10:07:57 +00:00
roy
f992e6532d Sync 2016-06-17 19:42:31 +00:00
christos
b011f946a6 fix variable length stack allocation from upstream 2016-06-08 01:33:08 +00:00
prlw1
854e85e5bd Handle truncated DHCP messages, provided only the BOOTP vendor area
is truncated.  [3fd740f3ed]
OK from roy@
2016-05-26 09:09:47 +00:00
martin
6f47729145 Avoid a "conversion to '__uint16_t' from 'int' may alter its value"
error on some architectures (like m68k).
2016-05-09 20:28:08 +00:00
roy
bc693cba55 Sync 2016-05-09 10:15:59 +00:00
christos
f8e7276e29 CID 1358677: (Negative returns) tuck in poll_fd assignment in eloop_open() 2016-04-24 18:20:40 +00:00
christos
5ca807aba7 CID 1358676: Forward NULL. 2016-04-24 18:16:05 +00:00
roy
302733a775 Sync 2016-04-20 08:53:01 +00:00
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
239a09e1aa Sync 2016-01-20 19:42:33 +00:00
roy
26d95753d3 Sync 2016-01-07 20:09:43 +00:00
christos
0ba3ac345d CID 1341552: Fix NULL deref 2015-12-03 21:04:59 +00:00
christos
e0b573d1a4 CID 1341552: Fix NULL deref. 2015-12-03 21:04:06 +00:00
roy
2d980baa58 Sync 2015-11-30 16:33:00 +00:00
christos
9fa485335a We really mean __sysloglike here... 2015-10-14 15:58:08 +00:00
roy
9a309d287d Sync 2015-09-04 12:25:01 +00:00
christos
34bf41c699 fix bogus gcc unitialized warning 2015-08-22 05:45:57 +00:00
roy
33ca8eec34 Remove unused variable. 2015-08-21 13:24:47 +00:00