Commit 7548f864 authored by Mike Hibler's avatar Mike Hibler

Random: always print out the IP when an unknown node connects.

parent cbb7281f
......@@ -1330,22 +1330,25 @@ handle_request(int sock, struct sockaddr_in *client, char *rdata, int rdatalen,
*/
if ((err = iptonodeid(client->sin_addr, reqp, privkey))) {
if (privkey) {
error("No such node with wanode_key [%s]\n", privkey);
error("No such node with wanode_key [%s] at %s\n",
privkey, inet_ntoa(client->sin_addr));
}
else if (reqp->external_key[0]) {
if (reqp->isvnode)
error("No such vnode %s with key %s\n",
reqp->vnodeid, reqp->external_key);
error("No such vnode %s with key %s at %s\n",
reqp->vnodeid, reqp->external_key,
inet_ntoa(client->sin_addr));
else
error("No such node with key %s\n",
reqp->external_key);
error("No such node with key %s at %s\n",
reqp->external_key,
inet_ntoa(client->sin_addr));
}
else if (reqp->isvnode) {
error("No such vnode %s associated with %s\n",
error("No such vnode %s at %s\n",
reqp->vnodeid, inet_ntoa(client->sin_addr));
}
else {
error("No such node: %s\n",
error("No such node at %s\n",
inet_ntoa(client->sin_addr));
}
goto skipit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment