Ted Lemon [Thu, 25 Jun 1998 03:07:51 +0000 (03:07 +0000)]
Nive parse-ip-addr-or-hostbname into common parser. Add executable statement parser. Add xpression parser. Unify the option statement parsers. Make the option token parser its own function.
Ted Lemon [Thu, 25 Jun 1998 03:02:50 +0000 (03:02 +0000)]
cons_options now takes option_state struct instead of options and agent_options args. Fix bufgfer overflow attack in parameter request list. Change over to expression evaluation code instead of ds tree evaluation code. do_packet now takes a pointer to a dhcp packet instead of a pointer to a character buffer. This fixess another possible overflow. Add per-option-universe lookup and set functions.
Ted Lemon [Thu, 25 Jun 1998 02:59:15 +0000 (02:59 +0000)]
Lose special case code for vendor and user classes. Get client identifier in host declaration off of per-host executable statement list rather than now-nonexistent option list. Fixed address is now an expression, not a tree. Take out host reverse lookup code - it doesn't belong here. Fix botch in dangling lease code.
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.
Check HAVE_SIN_LEN in sockaddr_dl code. Kludge hardware address length for now if HAVE_SIN_LEN isn't set. Return pointer to struct proto from add_protocol.
Ted Lemon [Tue, 17 Mar 1998 18:14:51 +0000 (18:14 +0000)]
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.
Ted Lemon [Mon, 16 Mar 1998 06:19:46 +0000 (06:19 +0000)]
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.
Ted Lemon [Sun, 15 Mar 1998 21:04:52 +0000 (21:04 +0000)]
If interfaces are specified, don't configure any that weren't. In INIT-REBOOT state, initialize the xid before calling make_request(). Check chaddr as well as xid to validate return from server. Make write_client_lease rewrite the client lease file after 20 leases have been written. Fix an xid bug in DHCPRELEASE code. Document Y2K non-bug.
Ted Lemon [Sun, 15 Mar 1998 20:54:20 +0000 (20:54 +0000)]
Don't mention compiling with BPF if user has multiple interfaces - if it's not happening now, it probably doesn't work. Also, correct = vs == confusion that was causing packets to go out with bogus destination addresses.
Ted Lemon [Sun, 15 Mar 1998 20:47:27 +0000 (20:47 +0000)]
Don't invalidate a lease if we receive an ICMP echo reply for it when it has a valid lease. This can happen if some other user on the host pings the client after we've assigned it an address.
Ted Lemon [Fri, 6 Feb 1998 01:18:33 +0000 (01:18 +0000)]
Parse agent options specially. Pack agent options into outgoing messages if supplied. Allow caller to pass dhcp_max_message_size into cons_options if the original packet is no longer available.
Ted Lemon [Fri, 6 Feb 1998 01:05:39 +0000 (01:05 +0000)]
Copy the entire chaddr field, even if the length is shorter than the total. This works around a bug in certain Microsoft clients. If the options aren't valid, just copy the option buffer from the incoming packet into the outgoing packet. This lets NeXT boxes boot. Adjust calling conventions for cons_options.