Ted Lemon [Thu, 5 Nov 1998 18:42:18 +0000 (18:42 +0000)]
Fix up all the option handling code to use evaluation instead of fixed data. User-specified option statements are not stored in a linked list of executable statements, rather than as data trees.
Ted Lemon [Thu, 25 Jun 1998 03:56:24 +0000 (03:56 +0000)]
Move a lot of packet discard code into ack_lease(), after we've evaluated the statements associated with a packet. Use new-style option processing. No more explicit user/vendor class support. Revamp lease time processing. Get client identifier directly from host declaration.
Ted Lemon [Thu, 25 Jun 1998 03:51:59 +0000 (03:51 +0000)]
Get rid of root group defaults. Merge trees into expressions. Allow host statements in class declarations (explicitly declaring a host to be in a specific class). Server universe declarations handled as statements. parse_allow_deny now creates statements. Grandfather old-style user and vendor class declarations. Add support for spawning classes. Can't flag dynamic bootp anymore. Move parse_ip_addr_or_hostname into common code. tree_cache -> option_cache. Move option parameter parsing into common parser. Put expression parser in common code.
Ted Lemon [Thu, 25 Jun 1998 03:35:31 +0000 (03:35 +0000)]
Merge tree struct into expression struct. tree_cache -> option_cache. Move data_string and expression structs from dhcpd.h. Fix up dns_host_entry struct. Add a per-universe set function.
Ted Lemon [Thu, 25 Jun 1998 03:25:02 +0000 (03:25 +0000)]
Add statement.h include file. Move data_string to tree.h. Add option_state structure, unifying values from all option universes into one structure. Lease_state structure now has option_state instead of options and agent_options. Group structure now has executable statements i. Configuration state not appropriate for DHCP option universe now in server option universe rather than explicitly declared and specially ahndled. Define names of server state options. Define a default default lease time, default min lease time and default max lease time. Put client identifier in host_decl structure. Move expression struct to tree.h. match_expr -> expression. Fix/update prototypes.
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.