summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index bcd25834e..3202e7e7b 100644
--- a/packet.c
+++ b/packet.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: packet.c,v 1.9 2000/01/14 04:45:50 damien Exp $"); 18RCSID("$Id: packet.c,v 1.10 2000/01/22 08:47:21 damien Exp $");
19 19
20#include "xmalloc.h" 20#include "xmalloc.h"
21#include "buffer.h" 21#include "buffer.h"
@@ -117,11 +117,11 @@ packet_connection_is_on_socket()
117 return 1; 117 return 1;
118 fromlen = sizeof(from); 118 fromlen = sizeof(from);
119 memset(&from, 0, sizeof(from)); 119 memset(&from, 0, sizeof(from));
120 if (getpeername(connection_in, (struct sockaddr *) & from, &fromlen) < 0) 120 if (getpeername(connection_in, (struct sockaddr *)&from, &fromlen) < 0)
121 return 0; 121 return 0;
122 tolen = sizeof(to); 122 tolen = sizeof(to);
123 memset(&to, 0, sizeof(to)); 123 memset(&to, 0, sizeof(to));
124 if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0) 124 if (getpeername(connection_out, (struct sockaddr *)&to, &tolen) < 0)
125 return 0; 125 return 0;
126 if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0) 126 if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0)
127 return 0; 127 return 0;