openbsd-ports/net/silc-server/patches/patch-apps_silcd_server_util_c
brad 374d7012bd add two patches for crashing issues.
From: SILC CVS via zoran ivanic <zoc at 5mm dot org>
2005-09-09 17:03:34 +00:00

29 lines
1.3 KiB
Plaintext

$OpenBSD: patch-apps_silcd_server_util_c,v 1.1 2005/09/09 17:03:35 brad Exp $
--- apps/silcd/server_util.c.orig Mon May 9 05:59:49 2005
+++ apps/silcd/server_util.c Mon Sep 5 19:39:45 2005
@@ -1103,6 +1103,7 @@ SilcUInt32 silc_server_num_sockets_by_ip
for (i = 0, count = 0; i < server->config->param.connections_max; i++) {
if (server->sockets[i] && !SILC_IS_LISTENER(server->sockets[i]) &&
+ !SILC_IS_HOST_LOOKUP(server->sockets[i]) &&
!strcmp(server->sockets[i]->ip, ip) &&
server->sockets[i]->type == type)
count++;
@@ -1128,6 +1129,7 @@ SilcUInt32 silc_server_num_sockets_by_re
for (i = 0, count = 0; i < server->config->param.connections_max; i++) {
if (server->sockets[i] && !SILC_IS_LISTENER(server->sockets[i]) &&
+ !SILC_IS_HOST_LOOKUP(server->sockets[i]) &&
((ip && !strcmp(server->sockets[i]->ip, ip)) ||
(hostname && !strcmp(server->sockets[i]->hostname, hostname))) &&
server->sockets[i]->port == port &&
@@ -1802,7 +1804,7 @@ silc_server_find_socket_by_host(SilcServ
int i;
for (i = 0; i < server->config->param.connections_max; i++) {
- if (!server->sockets[i])
+ if (!server->sockets[i] || SILC_IS_HOST_LOOKUP(server->sockets[i]))
continue;
if (!strcmp(server->sockets[i]->ip, ip) &&
(!port || server->sockets[i]->port == port) &&