Using dhcpctl_new_authenticator throws 'connection reset by peer' at dhcpctl_wait_for_completion
Johnson koil Raj
johnson.raj at wipro.com
Mon Jul 4 10:37:12 UTC 2011
Hi,
I am trying to use the authentication process available in DHCP
api. If I tried to use the dhcpctl_new_authenticator it always fails. If
I doesn't use that every thing works fine.
Here are my observations.
1) If I use this code.
dhcpctl_handle authenticator = NULL;
const char *keyname = "omapi_key";
const char *algorithm = "HMAC-MD5";
const char *secret =
"khN6caXkA8D6AjvbzFjFq43SPiI6f/UflutVKC9cxY2kpZGwDQG0dWxLGZ9pavPoGydbqYMKospa/0uVyjnTNw==";
status = dhcpctl_new_authenticator (&authenticator,
keyname,
algorithm,
secret, strlen(secret) + 1);
The dhcpctl_wait_for_completion call returns status 'connection reset
by peer'.
In dhcpd.conf the following configuration is used.
# Key for OMAPI
omapi-port 9991;
key omapi_key {
algorithm HMAC-MD5;
secret
"khN6caXkA8D6AjvbzFjFq43SPiI6f/UflutVKC9cxY2kpZGwDQG0dWxLGZ9pavPoGydbqYMKospa/0uVyjnTNw==";
};
omapi-key omapi_key;
2) If I use this sort of code
status = dhcpctl_connect (&connection, "127.0.0.1", 9991, 0);
In dhcpd.conf I commented out omapi-key entry.
# Key for OMAPI
omapi-port 9991;
key omapi_key {
algorithm HMAC-MD5;
secret
"khN6caXkA8D6AjvbzFjFq43SPiI6f/UflutVKC9cxY2kpZGwDQG0dWxLGZ9pavPoGydbqYMKospa/0uVyjnTNw==";
};
#omapi-key omapi_key;
Now everything work fines.
Whether I am missing any stuff when using keys for authentications. Any
help would be greatfull.
Thanks,
Johnson
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110704/b9708175/attachment.html>
More information about the dhcp-users
mailing list