lookup_hashed_option()
Anshuman Singh Rawat
asr245 at nyu.edu
Fri Jul 23 00:34:16 UTC 2004
From: Ted Lemon <mellon at nominum.com>
> On Jul 22, 2004, at 4:28 PM, Anshuman Singh Rawat wrote:
> > - in ack_lease(), the execute_statements_in_scope() is called
> with the
> > binding scope of the lease for DHCPDISCOVER & DHCPREQUEST. For
> > DHCPINFORM, it's called with the binding scope of 'global_scope'.
> >
> > Does this provide any more information than I gave earlier about
> the
> > problem?
>
> What I am trying to communicate, perhaps too gently, is that you
> probably have a problem in your configuration file, not a problem
> in
> your source code. I may be mistaken, of course.
> Execute_statements_in_scope is called to prepare an option_state
> structure, once for each scope that is relevant to the client's
> request. What is probably happening is that when the client sends
> a
> DHCPREQUEST, the option you are looking for is in scope, but when
> it
> sends a DHCPINFORM, the option you are looking for is not in scope.
>
> You need to figure out why this option is in scope when the client
> sends a DHCPREQUEST, and not in scope when it sends a DHCPINFORM.
> I
> would suggest that you compare all the execute_statements_in_scope
> calls in the DHCPINFORM and DHCPREQUEST handler, and you will
> probably
> find the source of your problem. By the time you get to
> lookup_option(), it's too late to figure out why the option isn't
> in
> the option_state structure.
Thanks. I think found the problem. The DHCPDISCOVER/DHCPREQUEST handler also execute the function execute_statements_in_scope() in the scope of the host declaration (which has the option I am looking for), whereas the DHCPINFORM handler doens't do that, the reason why it doesn't fetch the required option. When I included the option I required in the subnet scope in the configuration file, I got the option (though that doesn't help me much as this option is information about location of the client, which would be different for each client).
More information about the dhcp-hackers
mailing list