removed synchronous DNS lockup vulnerability

This commit is contained in:
Jeff Hill
2000-10-10 22:42:37 +00:00
parent 05134e7b9f
commit b34f800f31
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ LOCAL void log_header (
struct channel_in_use *pciu;
char hostName[256];
ipAddrToA (&client->addr, hostName, sizeof(hostName));
ipAddrToDottedIP (&client->addr, hostName, sizeof(hostName));
pciu = MPTOPCIU(mp);
+1 -1
View File
@@ -120,7 +120,7 @@ void camsgtask (struct client *client)
/*
* disconnect when there are severe message errors
*/
ipAddrToA (&client->addr, buf, sizeof(buf));
ipAddrToDottedIP (&client->addr, buf, sizeof(buf));
epicsPrintf ("CAS: forcing disconnect from %s\n", buf);
break;
}
+1 -1
View File
@@ -115,7 +115,7 @@ void cas_send_msg (struct client *pclient, int lock_needed)
anerrno = SOCKERRNO;
ipAddrToA (&pclient->addr, buf, sizeof(buf));
ipAddrToDottedIP (&pclient->addr, buf, sizeof(buf));
if(pclient->proto == IPPROTO_TCP) {
if ( (anerrno!=SOCK_ECONNABORTED&&
+2 -2
View File
@@ -250,7 +250,7 @@ struct client *create_client (SOCKET sock)
if (CASDEBUG>0) {
char buf[64];
ipAddrToA (&client->addr, buf, sizeof(buf));
ipAddrToDottedIP (&client->addr, buf, sizeof(buf));
errlogPrintf ("CAS: conn req from %s\n", buf);
}
@@ -436,7 +436,7 @@ LOCAL void log_one_client (struct client *client, unsigned level)
TS_STAMP current;
char clientHostName[256];
ipAddrToA (&client->addr, clientHostName, sizeof(clientHostName));
ipAddrToDottedIP (&client->addr, clientHostName, sizeof(clientHostName));
if(client->proto == IPPROTO_UDP){
pproto = "UDP";
+3 -3
View File
@@ -271,7 +271,7 @@ int cast_server(void)
if (CASDEBUG>1) {
char buf[40];
ipAddrToA (&prsrv_cast_client->addr, buf, sizeof(buf));
ipAddrToDottedIP (&prsrv_cast_client->addr, buf, sizeof(buf));
errlogPrintf ("CAS: cast server msg of %d bytes from addr %s\n",
prsrv_cast_client->recv.cnt, buf);
}
@@ -286,7 +286,7 @@ int cast_server(void)
prsrv_cast_client->recv.stk){
char buf[40];
ipAddrToA (&prsrv_cast_client->addr, buf, sizeof(buf));
ipAddrToDottedIP (&prsrv_cast_client->addr, buf, sizeof(buf));
epicsPrintf ("CAS: partial (damaged?) UDP msg of %d bytes from %s ?\n",
prsrv_cast_client->recv.cnt-prsrv_cast_client->recv.stk, buf);
@@ -295,7 +295,7 @@ int cast_server(void)
else {
char buf[40];
ipAddrToA (&prsrv_cast_client->addr, buf, sizeof(buf));
ipAddrToDottedIP (&prsrv_cast_client->addr, buf, sizeof(buf));
epicsPrintf ("CAS: invalid (damaged?) UDP request from %s ?\n", buf);
}
+2 -2
View File
@@ -149,7 +149,7 @@ int rsrv_online_notify_task()
status = connect (sock, &pNode->addr.sa, sizeof(pNode->addr.sa));
if (status<0) {
ipAddrToA (&pNode->addr.ia, buf, sizeof(buf));
ipAddrToDottedIP (&pNode->addr.ia, buf, sizeof(buf));
errlogPrintf ( "%s: CA beacon routing (connect to \"%s\") error was \"%s\"\n",
__FILE__, buf, SOCKERRSTR(SOCKERRNO));
}
@@ -167,7 +167,7 @@ int rsrv_online_notify_task()
status = send (sock, (char *)&msg, sizeof(msg), 0);
if (status < 0) {
ipAddrToA (&pNode->addr.ia, buf, sizeof(buf));
ipAddrToDottedIP (&pNode->addr.ia, buf, sizeof(buf));
errlogPrintf ( "%s: CA beacon (send to \"%s\") error was \"%s\"\n",
__FILE__, buf, SOCKERRSTR(SOCKERRNO));
}