add two patches for crashing issues.

From: SILC CVS via zoran ivanic <zoc at 5mm dot org>
This commit is contained in:
brad 2005-09-09 17:03:34 +00:00
parent d15caec224
commit 374d7012bd
3 changed files with 44 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.23 2005/09/05 16:12:50 brad Exp $
# $OpenBSD: Makefile,v 1.24 2005/09/09 17:03:34 brad Exp $
COMMENT= "Secure Internet Live Conferencing (SILC) server"
DISTNAME= silc-server-1.0
PKGNAME= ${DISTNAME}p3
PKGNAME= ${DISTNAME}p4
CATEGORIES= net
HOMEPAGE= http://www.silcnet.org/

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-apps_silcd_command_c,v 1.1 2005/09/09 17:03:35 brad Exp $
--- apps/silcd/command.c.orig Tue May 10 12:59:01 2005
+++ apps/silcd/command.c Mon Sep 5 19:39:15 2005
@@ -2964,6 +2964,10 @@ SILC_SERVER_CMD_FUNC(cmode)
new channel key. Clients are not using private channel keys
anymore after this. */
+ /* if we don't remove the flag from the mode
+ * silc_server_create_channel_key won't create a new key */
+ channel->mode &= ~SILC_CHANNEL_MODE_PRIVKEY;
+
/* Re-generate channel key */
if (!silc_server_create_channel_key(server, channel, 0))
goto out;

View File

@ -0,0 +1,28 @@
$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) &&