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

63 Commits

Author SHA1 Message Date
Ted Lemon
5941275aac Do client classification. If user supplies a dhcp-lease-time or related option, print a warning when issuing a lease. 1998-04-19 23:34:43 +00:00
Ted Lemon
421563ea10 Don't respond to requests that are newer than a configured number of seconds. Enforce a minimum lease time, if specified. If a dhcp-server-identifier option has been specified, use that instead of coming up with one from the shared_network structure. Allow the routers option to be set to the client's address. Be more clever about dealing with duplicate leases. 1998-04-09 04:41:52 +00:00
Ted Lemon
48984237a1 If we happen across an abandoned lease when trying to find a lease to allocate, try using the abandoned lease. If the client asks for a lease on one address, but we find another lease that's also assigned to it, make every effort to free the duplicate lease, since a client can't have two leases on the same network at the same time. 1998-03-17 18:14:51 +00:00
Ted Lemon
f3c3d67454 Allow unnamed host declarations. 1998-03-17 06:20:51 +00:00
Ted Lemon
a7822eac77 Declare arguments that can be promoted so that the compiler's behaviour doesn't change depending on whether or not it follows ANSI. Fix signed vs. unsigned char discrepencies. 1998-03-16 06:19:46 +00:00
Ted Lemon
3c893bb6ce Adjust cons_options calls. Copy the entire chaddr field even if hlen indicates it's shorter. Keep track of Relay Agent Information options. 1998-02-06 01:08:38 +00:00
Ted Lemon
0c11afbceb NAK if a client requests an address that we own but can't give to it. 1997-12-06 04:04:50 +00:00
Ted Lemon
355bf452dc If we're responding to a BOOTP request, hunt for a lease that's applicable - there might be more than one lease matching the network and the hardware address. 1997-12-02 09:28:08 +00:00
Ted Lemon
ec8d21a783 Copy the hardware address into the static lease structure so that it can be used later. 1997-12-02 09:07:03 +00:00
Ted Lemon
599c23c128 If we find more than one lease for the same client on the same network, give it the one it asked for. 1997-12-02 07:43:56 +00:00
Ted Lemon
2ba8b7cdaf Fix DHCPRELEASE handling to conform to spec 1997-11-29 07:57:02 +00:00
Ted Lemon
f48132f7f8 Don't ping static leases - there's no persistent structure for them! 1997-10-20 22:28:18 +00:00
Ted Lemon
a52d8045b3 Pass flag to cons_options indicating whether this is BOOTP or DHCP. Change handling of dynamic BOOTP packets. Allow or deny booting based on vendor class if enabled. 1997-09-16 18:20:30 +00:00
Ted Lemon
be6b4b2a2b Only store through ours if it's nonzero 1997-06-08 04:10:41 +00:00
Ted Lemon
2b260752e0 Fix variable declaration omission 1997-06-08 03:58:47 +00:00
Ted Lemon
fa97acc108 If the lease we want to give the client is different than the one it's asking for, and we recognize the one it's asking for as ours, NAK it. 1997-06-08 03:55:58 +00:00
Ted Lemon
44b2e3adb2 Fix bug introduced into dhcprequest processing. Fix core dump differently. Store client-supplied hostname. Fix ciaddr copy. 1997-05-09 08:27:14 +00:00
Ted Lemon
14b5afc442 Put parentheses around & operations 1997-03-06 20:23:27 +00:00
Ted Lemon
74c13ab5db If a lease has been abandoned, don't find it. 1997-03-06 19:30:52 +00:00
Ted Lemon
4b7df7078c Add a message to abandon_lease; ping before sending DHCPREQUEST. 1997-03-06 18:40:22 +00:00
Ted Lemon
9cc3ad7f14 Move a ton of bits from the lease structure into the lease_state structure. The lease structure is permanent, whereas the state structure is ephemeral, which means that leases now consume less memory (memory consumption is now about the same as in Beta 5 Patchlevel 14). Allocate and free the lease_state structure. If ack_lease is called on a lease that already has a state structure, we're already acking something, so we don't try to ack it again. 1997-03-06 07:02:00 +00:00
Ted Lemon
11b37280ba Move some state into the lease structure so that we can test a lease before acking it, and so that we can do DNS lookups asynchronously 1997-03-05 06:37:05 +00:00
Ted Lemon
a62eea55ac Don't check the lease we have for the client until we've verified that the client thinks it's on the right network 1997-03-05 06:18:55 +00:00
Ted Lemon
e6e5d8749e Don't NAK leases from competing servers 1997-02-22 12:25:11 +00:00
Ted Lemon
d00ecc3cef Clean up some bugs in the DHCPREQUEST lease code 1997-02-22 10:22:05 +00:00
Ted Lemon
801ecd88d7 Use interface address instead of common server identifier; allow specific clients to be excluded from booting; don't release a lease based on a DHCPREQUEST to a different server - this isn't allowed by the protocol 1997-02-22 08:48:15 +00:00
Ted Lemon
a4cb16cab9 Change calling conventions for cons_options so that DHCP client doesn't have to dummy up a packet 1997-02-18 14:28:54 +00:00
Ted Lemon
d557e6d40b Fix broadcast bug 1997-01-03 11:39:27 +00:00
Ted Lemon
b289b0107c Fix bug in classing code 1996-12-31 02:02:54 +00:00
Ted Lemon
c34fcd388b Notice if client is NUL-terminating strings, and if it is, NUL-terminate them back. 1996-09-11 05:52:18 +00:00
Ted Lemon
4ecd2958d5 mockup_lease() now supplies uid info if present; supply subnet mask from subnet decl if not defined as an option; fix lease time blooper; provide T1 and T2 lease times 1996-09-05 23:52:10 +00:00
Ted Lemon
ef6f87b4d6 Fix signed/unsigned char type mismatch 1996-08-29 20:12:37 +00:00
Ted Lemon
d58a12592d Add special support for hostname option 1996-08-28 01:29:25 +00:00
Ted Lemon
4fbcd99136 Don't try to respond to packets if we can't figure where they came from; add support for next_server (siaddr) field; adjust for new group structure; don't use siaddr as source address; check hw_lease, not lease; allow leases to be kept on more than one network; allow user-specified dynamic bootp lease lengths; add support for ignoring unknown clients 1996-08-27 09:37:50 +00:00
Ted Lemon
f8cd781ecc Find_lease should not reallocate leases to clients if the UID differs 1996-06-27 19:04:29 +00:00
Ted Lemon
8ec97099c1 Ensure that dhcp packets are at least BOOTP_MIN_LEN bytes long when sending through gateways 1996-06-24 20:32:12 +00:00
Ted Lemon
e2cb6d536a Use standard IP stack to send responses to clients with known IP addresses 1996-06-12 23:49:58 +00:00
Ted Lemon
1a4b272feb Don't unicast to client if broadcast is requested 1996-06-12 04:01:16 +00:00
Ted Lemon
eebea44806 Delete unused automatic variables 1996-06-04 19:04:16 +00:00
Ted Lemon
a69f4fd396 Make packet messages say where the packet came from and where it's going. 1996-06-01 00:18:15 +00:00
Ted Lemon
d01578b720 Handle DHCPREQUEST properly when no SERVER_IDENTIFIER has been supplied; put hardware address in mocked-up lease 1996-05-28 18:16:04 +00:00
Ted Lemon
45023390b4 Fix an uninitialized pointer bug 1996-05-25 18:37:34 +00:00
Ted Lemon
faf4a8deba a shared network might have no dynamically allocatable leases, so check for null pointer 1996-05-24 18:49:34 +00:00
Ted Lemon
b6b1cadf14 Make sure uid_lease is initialized somewhere; use ciaddr to find lease if Requested Address option not present 1996-05-23 22:22:35 +00:00
Ted Lemon
15c00bbad9 Don't assume routed packets are local; fix up dhcp_nak generation 1996-05-23 01:59:38 +00:00
Ted Lemon
e29c53f6f0 Initialize free host pointer 1996-05-22 10:14:42 +00:00
Ted Lemon
acf6cfe389 Make sure there's a host hanging off the lease before dereferencing it 1996-05-22 09:51:26 +00:00
Ted Lemon
3a5811084f Move packet location code out of dispatch 1996-05-22 09:29:56 +00:00
Ted Lemon
7a049f2ccd shared net support; static dhcp address assignment; dynamic bootp support 1996-05-22 07:21:50 +00:00
Ted Lemon
20581a0b07 Fix copyright; SA_LEN instead of SIN_LEN; formatting consistency 1996-05-20 00:04:24 +00:00