2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

62 Commits

Author SHA1 Message Date
Ted Lemon
86c60cbea0 Don't malloc zero-length uid buffer. 2001-04-24 01:02:24 +00:00
Ted Lemon
18529fb0c5 Unbill classes before dereferencing them. 2001-04-24 00:55:31 +00:00
Ted Lemon
5b9b3c1f96 When a release expires or is released, unbill it. 2001-04-20 20:39:54 +00:00
Ted Lemon
a58978f058 Fix lease binding state transitions. 2001-04-16 22:32:58 +00:00
Ted Lemon
ff591474e0 Make compiles work without NSUPDATE. 2001-04-09 01:18:15 +00:00
Ted Lemon
77f5b2d92e Process the state transition if we're doing a deferred update. 2001-04-06 01:03:39 +00:00
Ted Lemon
940e5b93bd Initialize a couple of pointers. 2001-03-16 01:57:00 +00:00
Ted Lemon
cb8176c4ae Always reference count leases. 2001-03-15 23:22:33 +00:00
Ted Lemon
0240e57c46 Check comp->uid instead of lease->uid when entering a lease's ID info. 2001-03-14 15:45:41 +00:00
Damien Neil
15c24b882b Changed supersede_lease() to return 1, even if the commit option is
not specified.  (Before, it would always return 0 if commit was not
given.)  Fixed up the one call to supersede_lease() which expected
the old behavior.

Added a check to supersede_lease() to return an error if the pimmediate
flag is given, and commit is not.  (You should never be sending information
on an uncommitted lease to a peer.)

Separated the failover queue update (the propogate flag) test from
the commit test in supersede_lease(), so that you can now enqueue an
update on an uncommitted lease.
2001-02-15 21:34:08 +00:00
Ted Lemon
25f11933ac - Get rid of lease -> hostname, which doesn't do anything.
- Fix a bug in uid handling that could cause core dumps with long uids.
2001-02-12 21:09:21 +00:00
Ted Lemon
6fb139d337 - Fix a core dump pointed out by Albert Herranz.
- Fix handling of agent options.
2001-01-25 08:36:36 +00:00
Ted Lemon
e7bd704742 Do not delete a client's DNS entry on entry to a transitory state (e.g., expired). 2001-01-19 11:10:32 +00:00
Ted Lemon
6657e93a64 Don't try to move the lease if it doesn't have a pool. 2001-01-06 21:39:30 +00:00
Ted Lemon
b282197910 - Move ddns_removals out of the on_release conditionals so that it actually
happens.
2001-01-04 00:30:53 +00:00
Ted Lemon
4bcdb16d41 Fix a case where leases could wind up with too many references. 2000-12-28 23:34:08 +00:00
Damien Neil
b992d7e23d DDNS implementation rewrite. DDNS should now operate according to
<draft-ietf-dhc-dhcp-dns-12.txt>.

common/options.c, common/tables.c, includes/dhcp.h:
  Split the fqdn.name option into fqdn.hostname and fqdn.domainname.

includes/dhcpd.h, server/Makefile.dist, server/ddns.c, server/dhcp.c,
server/mdb.c, server/stables.c:
  Added a new file (server/ddns.c) containing the DDNS updates code.
  This file exports two functions: ddns_updates() and ddns_removals().
  ddns_updates() is called when a lease is granted, and ddns_removals()
  is called when the lease expires or is released.

server/dhcpd.c:
  Remove the previous DDNS update code, and add default code for the
  ddns-hostname, ddns-domainname, ddns-ttl, and ddns-rev-domainname
  server options.
2000-12-11 18:56:45 +00:00
Ted Lemon
38d717583a Don't blow away bindings and such when releasing or abandoning leases. 2000-12-05 07:32:26 +00:00
Ted Lemon
9e3831637a Pass client state to eval functions. Lots of other stuff. 2000-11-28 23:27:24 +00:00
Ted Lemon
8e775b7b6d Don't enter leases that don't have subnets. 2000-09-29 18:21:33 +00:00
Damien Neil
1b234d446f Finished up function call support. 2000-08-28 19:36:39 +00:00
Ted Lemon
6ceb9118e9 Reference count binding scopes. Align IP headers on output. 2000-07-27 09:03:08 +00:00
Ted Lemon
c1af245e17 - Fix a bug where the first host declaration with a hardware address
wasn't being entered into the database.
2000-07-09 07:00:06 +00:00
Ted Lemon
d9961d3a68 Maintain a free list of leases if compact leases are being used. 2000-07-06 22:40:27 +00:00
Ted Lemon
5e3683817d - Fix some bugs in the lease timeout code.
- When transition to FTS_ACTIVE happens, set next state.
- Conditionalize failover-specific code.
2000-07-06 10:27:41 +00:00
Ted Lemon
fd5cbc1eb9 Don't dereference the lease on_expiry pointer if it's been zapped. 2000-07-06 06:26:42 +00:00
Ted Lemon
92f240976e - Dereference leases after hashing them.
- When a new lease has a different billing class, use it.
- Sort leases with the same time last in first, to shorten the
  insertion time for large pools.
2000-07-05 07:38:09 +00:00
Ted Lemon
6bbeb85aa9 Fix a couple of cases where the first host wouldn't be hashed. 2000-06-30 00:40:19 +00:00
Ted Lemon
0756bc8ae9 - Get rid of the obnoxious doubly-linked list and seperate timeout queue
and just make six lists with six kinds of leases sorted as timeout queues.
2000-06-07 00:15:53 +00:00
Ted Lemon
007e3ee4df Rework DHCP lease state handling to be compatible with failover protocol. 2000-06-02 21:27:21 +00:00
Ted Lemon
20916cae75 - Fix all the OMAPI objects in the DHCP server and client that weren't
being correctly reference-counted.
- Make and use object-specific allocators.
- Add reference/dereference support to hash functions and to timeout
  functions.
2000-05-16 23:03:49 +00:00
Ted Lemon
8c8e27c53e Implement pool request and response so that secondary can operate. 2000-05-04 18:58:16 +00:00
Ted Lemon
f9cda22163 Queue failover update on lease commit. Write all states on startup. 2000-05-03 06:34:13 +00:00
Ted Lemon
7d9784f6fc Patch in TSIG, just to see how to get it to work. 2000-03-18 02:15:52 +00:00
Ted Lemon
49733f31d3 Go back to the BSD license. 2000-03-17 04:00:32 +00:00
Ted Lemon
716f3d0c84 - Fix up calls to new_hash.
- Fix usage of hardware address in host lookup routine.
2000-03-06 23:35:16 +00:00
Ted Lemon
4bd8800e89 Fix compilation errors introduced in the last set of checkins. 2000-01-26 14:56:18 +00:00
Ted Lemon
583cab3c28 Fix binding support. 2000-01-25 01:42:48 +00:00
Ted Lemon
77d58db250 Get rid of ddns_rev_name and ddns_fwd_name. 2000-01-08 01:48:42 +00:00
Ted Lemon
d0607c8e48 Don't check for pool peer if FAILOVER_PROTOCOL isn't defined. 2000-01-05 18:49:47 +00:00
Ted Lemon
ebf0fbac3a Lots of small changes to support failover. New struct hardware support. 2000-01-05 18:22:07 +00:00
Ted Lemon
d9eefc5dec Mass commit for Brian Murrell. 1999-11-20 18:36:32 +00:00
Ted Lemon
df73931267 More fixups for lease expiry code. 1999-11-14 00:32:28 +00:00
Ted Lemon
ccbdce1467 - Delete on_expiry events when lease is released, regardless of whether
there's a release event.
- If the lease being superseded is the next in a pool to expire, clean that
  up before superseding.
- Also, if the next lease to expire in a pool expires at the same time as
  the current lease, make sure that both expire, not just one.
1999-11-12 17:21:28 +00:00
Ted Lemon
3107c7f9bb Zero out on_* statements before superseding lease with copied template. 1999-11-07 20:38:01 +00:00
Ted Lemon
a816cb178e Clean up a loophole in the code that sets up the pool expiry timer. 1999-10-28 15:53:05 +00:00
Ted Lemon
494bf48827 Oops, fix typo. 1999-10-28 13:07:06 +00:00
Ted Lemon
2616896572 Use the right expiry event. Count leases, hosts and groups written and log each. 1999-10-27 23:05:17 +00:00
Ted Lemon
394d5a3dc1 Clean up deleted vs. undeleted leases. 1999-10-25 01:55:40 +00:00
Ted Lemon
e96b71e15c Get rid of dynamic_hosts kludge - do host deletion like group deletion. 1999-10-24 23:27:52 +00:00