#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.83 2001/01/26 06:17:01 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.84 2001/02/12 19:43:32 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
cfg_options, scope, oc, MDL);
if (!od.len) {
data_string_forget (&encapsulation, MDL);
+ data_string_forget (&od, MDL);
have_encapsulation = 0;
continue;
}
struct binding_scope **scope;
struct universe *universe;
{
- pair p, *hash;
+ pair ocp;
int status;
int i;
static struct option_cache *no_nwip;
struct data_string ds;
+ struct option_chain_head *head;
if (universe -> index >= cfg_options -> universe_count)
return 0;
+ head = ((struct option_chain_head *)
+ cfg_options -> universes [fqdn_universe.index]);
+ if (!head)
+ return 0;
- hash = cfg_options -> universes [universe -> index];
status = 0;
- for (i = 0; hash && i < OPTION_HASH_SIZE; i++) {
- for (p = hash [i]; p; p = p -> cdr) {
- if (store_option (result, universe, packet,
- lease, client_state, in_options,
- cfg_options, scope,
- (struct option_cache *)p -> car))
- status = 1;
- }
+ for (ocp = head -> first; ocp; ocp = ocp -> cdr) {
+ struct option_cache *oc = (struct option_cache *)(ocp -> car);
+ if (store_option (result, universe, packet,
+ lease, client_state, in_options,
+ cfg_options, scope,
+ (struct option_cache *)ocp -> car))
+ status = 1;
}
/* If there's no data, the nwip suboption is supposed to contain
unsigned long previous_outstanding = dmalloc_outstanding;
#endif
+#if defined (TRACING)
+ trace_inpacket_stash (interface, packet, len, from_port, from, hfrom);
+#endif
+
decoded_packet = (struct packet *)0;
if (!packet_allocate (&decoded_packet, MDL)) {
log_error ("do_packet: no memory for incoming packet!");