2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 18:07:25 +00:00

214 Commits

Author SHA1 Message Date
Shawn Routhier
eda1d0aa5a [master] Hnadle dhcpv6 being disabled better
The previous patches didn't handle dhvpv6 being disabled well.
    This change moves the #ifdefs a bit to handle it.
2016-01-12 12:33:26 -08:00
Shawn Routhier
b2cb745bd4 [master] Emit better error messages for command line issues
When emitting an error message due to a bad command line try to
include information about the argument that is at fault.
2016-01-06 16:32:25 -08:00
Shawn Routhier
c88dfebddd [master] Update client code to RFC7550
Update the v6 client code to handle getting
IA_NAs and IA_PDs in the same request better.

Squashed commit of the following:

commit ad1bf23100eba541c26c6c26fc2c5c9dc57dd674
Author: Shawn Routhier <sar@isc.org>
Date:   Mon Nov 16 23:08:13 2015 -0800

    [rt40190] Use dhc6_check_status for addresses and prefixes

commit 4cb1d499342e68c5c93b7e8dac71c9adbd737846
Author: Shawn Routhier <sar@isc.org>
Date:   Mon Nov 16 22:02:05 2015 -0800

    [rt40190] Correct the tests for a status code in the client

    Some of the tests for the NoAddrs or NoPrefix codes in the
    were incorrect, checking for a return of not success instead
    of success.

commit 41ad9ea4438c0f64b95ec7afeac38afd2f3b36cb
Author: Shawn Routhier <sar@isc.org>
Date:   Fri Nov 13 21:04:55 2015 -0800

    [rt40190] Update site.h to have the correct default

commit cb720dac6670e1a6cc19b22550506ded4093abef
Author: Shawn Routhier <sar@isc.org>
Date:   Fri Nov 13 21:03:38 2015 -0800

    [rt40190] update per second set of review comments

    Mostly this is a set of updates to the documentation.
    The only code change is to add a backwards compatibility
    option in includes/site.h for people who want the old weightings
    for the client lease scoring.

commit 269a5324b950062380b4e3988f56593dc21d05d9
Author: Thomas Markwalder <tmark@isc.org>
Date:   Thu Nov 12 09:00:36 2015 -0500

    [40190] Fixed another typo

commit 7da158497cd9236c30dfdce2b115818d1954839f
Author: Thomas Markwalder <tmark@isc.org>
Date:   Thu Nov 12 07:29:33 2015 -0500

    [40190] Minor cosmetics in dhc6.c

commit a010737de36e5ad2f46bb11f471ac66ccbc856aa
Author: Shawn Routhier <sar@isc.org>
Date:   Sat Nov 7 00:05:20 2015 -0800

    [rt40190] Update the use of the minimum score

    Update the use of the minimum score to use #defines instead
    of 150.  This corrects it for the current values and allows
    us to change the values if we include a backwards compatibility
    option.

commit b078575da08c06a75a49110273bf42e24d03c08a
Author: Shawn Routhier <sar@isc.org>
Date:   Fri Nov 6 21:55:05 2015 -0800

    [rt40190] Updates per review comments

    Update several comments to be more informative

    The code changes are mostly to fold all the two
    bare_ia routines together.

commit 248c498d45db5533f992fb6eb30ee6c3c399ee81
Author: Shawn Routhier <sar@isc.org>
Date:   Tue Oct 20 02:06:45 2015 -0700

    [rt40190] Fix up some typos

commit ba074eff2e82af0cfd25428e7f38bccd5fef7241
Author: Shawn Routhier <sar@isc.org>
Date:   Tue Oct 20 01:28:34 2015 -0700

    [rt40190] Patch for client side of 7550

    Finish up the code to handle multiple PDs and NAs
    in a single request, this includes updating the
    command line to add the -R option to require the
    requested IAs rather than accept the best advertised
    offer.

commit 5bb4368b8410e3c7bcdc28fdf4ae5572df04d03b
Author: Shawn Routhier <sar@isc.org>
Date:   Thu Oct 15 09:50:14 2015 -0700

    [rt40190] checkpoint my work

    The basic code is working there are still some issues with how
    corner cases get handled that I need to resolve

commit 4c0dba90fcd71c85fca3612aa5083fa11645f8f6
Author: Shawn Routhier <sar@isc.org>
Date:   Sun Oct 11 19:23:53 2015 -0700

    [rt40190] Some changes for rfc7550, to be updated

    This is being checked in so I can look at other tickets
    but I plan to re-arrange the code a fair amount.
2015-12-01 21:58:36 -08:00
Francis Dupont
7acd875396 Remerged #38692 2015-11-17 16:43:44 +01:00
Francis Dupont
bf673d217b Unmerged #38692 2015-11-17 16:36:19 +01:00
Francis Dupont
646acb59b4 Merged #38692 (use program base name in (sys)log) 2015-09-12 19:18:50 +02:00
Thomas Markwalder
6a39bcf0be [master] Fixed server crash after billing class is deleted
Merges in rt39978.
2015-07-29 08:32:50 -04:00
tmarkwalder
cca6a64801 [master] Fixed dhclient crash on lease renew when client is doing ddns
Merged in 38639.
2015-06-25 07:26:34 -04:00
Thomas Markwalder
2794167d42 [master] Updates in prep for 4.3.2.pre-beta
Updated version info, etc
2015-01-08 15:22:56 -05:00
Shawn Routhier
e9326fd0f4 [master] Add define to disable gentle shutodwn by default
Add a define to disable the gentle shutdown feature by default.
The feature has some effects (recover-wait in failvoer pairs)
and release in clients that are always desired.  We plan to
revisit this in order to make it easier to use but with the
define it can be enabled if necessary.
2014-07-02 08:49:19 -07:00
Shawn Routhier
b05e05b731 [master] Address memory leak in dhclient code.
address memory leak
2014-06-10 10:30:32 -07:00
Shawn Routhier
8a2e40cff8 [master] When writing a client lease file use the fsync call 2014-05-19 13:22:03 -07:00
Shawn Routhier
79818c9344 [master] Add -df option to client code to help share DUIDs
Add the "-df <duid file>" option to the client code in order
to make it easier to share DUIDs between a v4 instance and
a v6 instance.  This option instructs the client to search
the duid file for a DUID if it didn't find one in the main
lease file.

In addition add the infrastructure for running ATF tests
for the client and write some ATF tests for this patch.
2014-05-16 15:24:48 -07:00
Shawn Routhier
00e9af8ee0 [master] Add configure option to incude PID in syslog entries 2014-05-07 12:19:33 -07:00
Shawn Routhier
02b0bdc3cf [master] Some small client changes
18933 - add an extra server by name call
26735 - when requested via a command line option
        have client exit afer 1 failure per the docs
33098 - expose next-server option to dhclient script
2014-05-07 08:20:12 -07:00
Shawn Routhier
f950de775f [master] Add code to remove pid files and to log killing of clients 2014-05-07 08:03:19 -07:00
Shawn Routhier
324257e3db [master] Update version stamps and such for 4.3.0b1 2014-01-15 19:38:55 -08:00
Shawn Routhier
32da1939af [master] Prepare for 4.3.0a1
Update vesion stamps, copyright dates and the bind version to use.
2013-12-13 13:32:35 -08:00
Shawn Routhier
61ef216b8d [master] Add support for user selection of the from address for DDNS transactions 2013-12-11 08:08:42 -08:00
Shawn Routhier
0895c955d1 [master] Fix up the gentle shutdown code to handle failover
This patch modifies the gentle failover patch to
be cleaner and to handle failover peers better.
2013-11-14 12:55:10 -08:00
Shawn Routhier
47e8308dea [master]
[32692] Signal handlers added: sigint (ctrl-c) and sigterm (default kill)
2013-10-30 13:52:36 -07:00
Shawn Routhier
d7d9c0c7c3 -n [master]
Add code to support the standards version of DDNS
2013-10-14 15:53:24 -07:00
Shawn Routhier
a7341359cc -n [master]
[rt27912]
    Add code to suppor on {commit expiry release} statements for DHCPv6.
    There are several pieces to this change
    1) Add space in the iasubopt structure to hold the statement pointers
    2) Update the execute code to fill in the structures as necessary
    3) Execute the statements when appropriate
    Many of the changes in the non-v6 code are to pass the v6 structures
    around to the execute code.
2013-08-27 13:40:47 -07:00
Shawn Routhier
ad4001ce80 [master]
Add a sleep call after trying to kill a previous client.  This
should make the "-r" option to the client work more consistently.
[ISC-Bugs: 18175]
2013-08-27 10:31:27 -07:00
Mark Andrews
dc9d7b08aa - Silence benign static analysis warnings.
[ISC-Bugs #33428]
2013-05-15 10:49:54 +10:00
Shawn Routhier
10613724a9 [master]
The client now passes information about the options it requested
from the server to the script code via environment variables.
These variables are of the form requested_<option_name>=1 with
the option name being the same as used in the new_* and old_*
variables. [ISC-Bugs #29068]
2012-11-13 12:56:02 -08:00
Shawn Routhier
32e651c418 A problem with missing get_hw_addr function when --enable-use-sockets
was used is now solved on GNU/Linux, BSD and GNU/Hurd systems. Note
that use-sockets feature was not tested on those systems. Client and
server code no longer use MAX_PATH constant that is not defined on
GNU/Hurd systems. [ISC-Bugs 25979]
2012-06-08 23:28:11 +00:00
Shawn Routhier
35de6c8c24 Fix some issues in the code for parsing and printing options.
[ISC-Bugs #22625] - properly print options that have several fields
followed by an array of something for example "fIa"
[ISC-Bugs #27289] - properly parse options in declarations that have
several fields followed by an array of something for example "fIa"
[ISC-Bugs #27296] - properly determine if we parsed a 16 or 32 bit
value in evaluate_numeric_expression (extract-int).
[ISC-Bugs #27314] - properly parse a zero length option from
a lease file.  Thanks to Marius Tomaschewski from SUSE for the report
and prototype patch for this ticket as well as ticket 27289.
2012-06-06 22:50:31 +00:00
Tomek Mrugalski
dd9237c309 Fixed many compilation problems ("set, but not used" warnings) for
gcc 4.6 that may affect Ubuntu 11.10 users. [ISC-Bugs #27588]
2012-03-09 11:18:14 +00:00
Shawn Routhier
87132514a0 In the DDNS code handle error conditions more gracefully and add more
logging code.  The major change is to handle unexpected cancel events
from the DNS client code.
[ISC-Bugs 26287].
2012-02-03 22:47:43 +00:00
Tomek Mrugalski
d15aa96419 - Strict checks for content of domain-name DHCPv4 option can now be
configured during compilation time. Even though RFC2132 does not allow
  to store more than one domain in domain-name option, such behavior is
  now enabled by default, but this may change some time in the future.
  See ACCEPT_LIST_IN_DOMAIN_NAME define in includes/site.h.
  [ISC-Bugs #24167]
2011-07-01 12:07:09 +00:00
Tomek Mrugalski
a34feb7d81 - Code cleanup: remove obsolete PROTO, KandR, INLINE and ANSI_DECL macros
[ISC-Bugs #13151]
2011-05-11 14:01:25 +00:00
Shawn Routhier
fb30f3fc8b Minor code cleanups - but note port change for #23196
[ISC-Bugs #23470] - Modify when an ignore return macro is defined to
handle unsed error return warnings for more versions of gcc.
[ISC-Bugs #23196] - Modify the reply handling in the server code to
send to a specified port rather than to the source port for the incoming
message.  Sending to the source port was test code that should have
been removed.  The previous functionality may be restored by defining
REPLY_TO_SOURCE_PORT in the includes/site.h file.  We suggest you don't
enable this except for testing purposes.
[ISC-Bugs #22695] - Close a file descriptor in an error path.
[ISC-Bugs #19368] - Tidy up variable types in validate_port.
2011-05-11 00:38:56 +00:00
Tomek Mrugalski
5d082abd92 Several time related improvements:
- set initial delay to 0 to speed up client start
- added 'initial-delay' parameter to possibly revert to old behavior
- better handling of very short (1 or 2s) leases
- client lease records are recorded at most once every 15 seconds
- ICMP ping-check is now timed more precisely
- Servers that don't offer lease-time are now black-listed
[ISC-Bugs #19660]
2011-04-21 13:24:24 +00:00
Shawn Routhier
4a5bfeacbe Add the option "--no-pid" to the client, relay and server code,
to disable writing a pid file.  Add the option "-pf pidfile"
to the relay to allow the user to supply the pidfile name at
runtime.  Add the "with-relay6-pid-file" option to configure
to allow the user to supply the pidfile name for the relay
in v6 mode at configure time.
[ISC-Bugs #23351] [ISC-Bugs #17541]
2011-04-15 21:58:12 +00:00
Mark Andrews
1405aa2ddc move declartations to start of block 2011-04-04 23:09:43 +00:00
Shawn Routhier
bea1769742 In dhclient check the data for some string options for
reasonableness before passing it along to the script that
interfaces with the OS. [ISC-Bugs #23722]
2011-03-24 21:11:01 +00:00
Shawn Routhier
66be0ad13f Minor code fixes
[ISC-Bugs #19566] When trying to find the zone for a name for ddns allow
 the name to be at the apex of the zone.
 [ISC-Bugs #19617] Restrict length of interface name read from command line
 in dhcpd - based on a patch from David Cantrell at Red Hat.
 [ISC-Bugs #20039] Correct some error messages in dhcpd.c
 [ISC-Bugs #20070] Better range check on values when creating a DHCID.
 [ISC-Bugs #20198] Avoid writing past the end of the field when adding
 overly long file or server names to a packet and add a log message
 if the configuration supplied overly long names for these fields.
 [ISC-Bugs #21497] Add a little more randomness to rng seed in client
2010-09-08 22:13:05 +00:00
Shawn Routhier
98bf16077d Support for asynchronous ddns per ticket 19216 - convert to using isclib and
dnslib.
2009-10-28 04:12:30 +00:00
Shawn Routhier
2c85ac9b24 Switch isc urls from http to https and correct sw to services or software
for new web site as appropirate.
2009-07-23 18:52:21 +00:00
David Hankins
8a4e543b51 ! A stack overflow vulnerability was fixed in dhclient that could allow
remote attackers to execute arbitrary commands as root on the system,
  or simply terminate the client, by providing an over-long subnet-mask
  option.  [ISC-Bugs #19839]
2009-06-19 23:24:19 +00:00
Paul Selkirk
a41d7a251e pull up rt19436: client -D option 2009-05-27 20:11:38 +00:00
Shawn Routhier
ae56655628 Update for 19054 - modifications to keep GCC 4.3 happy 2009-01-22 00:43:58 +00:00
Shawn Routhier
59112e84f5 Validate argument to port option - bug 18695 2009-01-06 00:32:19 +00:00
David Hankins
40ec5f3863 - A double-dereference in dhclient transmission of DHCPDECLINEs was
repaired. [ISC-Bugs #18097]
2008-06-11 20:17:10 +00:00
Francis Dupont
420d8b3f0c merge 17500 2008-05-23 13:56:07 +00:00
Francis Dupont
3dbe22465b merge 17621 2008-05-23 13:22:23 +00:00
Francis Dupont
8720268367 Reliable DHCPv6 release 2008-02-27 09:13:03 +00:00
Francis Dupont
cabdb9b1c5 DHCPv6 released resources are now marked as released by the client 2008-02-20 23:20:58 +00:00
Evan Hunt
28ccc50f57 Oh guess what, this is 2008, not 2007... 2008-01-24 02:17:41 +00:00