omapi lease query question

markd mark at immermail.com
Tue May 30 14:51:54 UTC 2006


I want to find the active lease for a given MAC address,
and have a simple omapi client to do so.  But sometimes
a given MAC has both active and free leases, and the
dhcpctl_open_object() fails wth "more than one object
matches key" error.

How does one deal with this?  Is there a way to iterate
over a set of leases?  (I see nothing in the dhcpctl
man pages, but maybe it's buried deeper?)

I tried setting 'state' to active for the object, along
with the MAC address, to only match active leases, but
it seems to be ignored (regardless what I set state to)

Thanks,

Mark


More information about the dhcp-users mailing list