Need help with LEASEQUERY..

Jiri Popelka jpopelka at redhat.com
Fri May 21 13:37:49 UTC 2010


On 05/20/2010 06:04 PM, Pat Winn wrote:
> Matt,
> That codebase is (rather ironically) what I stumbled across
> and was using for a baseline when I started hacking away at this.
>
> I'm in the same boat as you...wanting to pull lease info from the
> running daemon rather than looking at what is in the leases file.
>    
Same here.
If you find (or succeed in writing) some working
LEASEQUERY sending piece of software (in whatever language)
I would very much appreciate to see it, because I'm also in need of it.
Thanks
> We are an isp and are in the process of switching from using radius
> with user authentication for our dialup and dsl customers to DHCP.
> As such, I need all the info I can glean for each session/lease for
> logging purposes and some of the info we need isn't in the leases
> file..so it's down to pulling from the running daemon.
>
> I've tried forking an omshell process to talk to the daemon and
> pull the lease info back into PHP. It worked fine except that every
> so often the omshell process hangs while connected to the daemon
> and won't disconnect. When that happens, the daemon stops responding
> to any new requests. Guessing it puts a lock on it's internal lease
> objects while omshell is connected since it can alter things and
> simply won't work until it disconnects...so that becomes an unusable
> option (short of patching ISC's code which I'd rather not tamper with).
>
> I've considered writing my own version of omshell in php but then
> figured out I could send a leasequery packet to the running daemon
> and get the same info back...without being connected to it like
> omshell. So now it's down to...create a PHP class which can send and
> receive a packet to get the info back that way and be able to re-use
> said class in whatever php code I want to use it in.
>
> That is...IF..I can ever get dhcpd to acknowledge that it received
> a lease query packet and actually respond to it.  :-(
>
> I'm totally open for suggestions at this point, and open to working
> in a collaborative fashion as well. Perhaps we could both benefit
> from it.  ;-)
>
> Thanks for your time and response!
>
>    




More information about the dhcp-hackers mailing list