killing dhcpd with dhcpctl_wait_for_completion

John Hascall john at iastate.edu
Wed Sep 16 12:05:15 UTC 2009


Obviously, I'm doing something horribly wrong here,
but I'm thinking it shouldn't kill dhcpd (and I'm
really not sure what I should be doing differently).

Have in config file:
	class "nat" { match hardware; }
	
Wanting to add the equivalent of:
	subclass "nat" 01:00:01:02:03:04:05;

Code, with error checks elided for compactness (all return
success except the last one):

	rc = dhcpctl_initialize();
	rc = dhcpctl_connect(&conn, "127.0.0.1", port, auth);
	rc = dhcpctl_new_object(&subclass, conn, "subclass");
	sprintf(hw, "01:%s", colonized(macaddr));
	dhcpctl_set_string_value(subclass, "nat", "name"); 
	dhcpctl_set_string_value(subclass, hw, "hashstring");
	rc = dhcpctl_open_object(subclass, conn, DHCPCTL_CREATE|DHCPCTL_EXCL);
	rc = dhcpctl_wait_for_completion(subclass, &wstatus);
	^^ returns ISC_R_CONNRESET and dhcpd is dead now

Other similar operations with "host" objects work fine.
Does anyone see where I've gone wrong?

Thanks,
John




More information about the dhcp-users mailing list