[Pkg-silc-commits] r309 - in /silc-server/branches/upstream/current: ./ apps/ apps/silcd/ doc/ includes/ lib/ lib/contrib/ lib/silcapputil/ lib/silcasn1/ lib/silccore/ lib/silccrypt/ lib/silchttp/ lib/silcmath/ lib/silcske/ lib/silcskr/ lib/silcutil/
micah at users.alioth.debian.org
micah at users.alioth.debian.org
Tue Oct 7 16:30:19 UTC 2008
Author: micah
Date: Tue Oct 7 16:30:19 2008
New Revision: 309
URL: http://svn.debian.org/wsvn/pkg-silc/?sc=1&rev=309
Log:
[svn-upgrade] Integrating new upstream version, silc-server (1.1.13)
Modified:
silc-server/branches/upstream/current/ChangeLog
silc-server/branches/upstream/current/Makefile.am
silc-server/branches/upstream/current/Makefile.in
silc-server/branches/upstream/current/apps/Makefile.am
silc-server/branches/upstream/current/apps/Makefile.in
silc-server/branches/upstream/current/apps/silcd/command.c
silc-server/branches/upstream/current/apps/silcd/packet_send.c
silc-server/branches/upstream/current/apps/silcd/server.c
silc-server/branches/upstream/current/apps/silcd/server_backup.c
silc-server/branches/upstream/current/apps/silcd/server_util.c
silc-server/branches/upstream/current/apps/silcd/silc-server.spec
silc-server/branches/upstream/current/apps/silcd/silcd.c
silc-server/branches/upstream/current/config.guess
silc-server/branches/upstream/current/config.sub
silc-server/branches/upstream/current/configure
silc-server/branches/upstream/current/configure.ac
silc-server/branches/upstream/current/doc/Makefile.am
silc-server/branches/upstream/current/doc/Makefile.in
silc-server/branches/upstream/current/doc/example_silcd.conf
silc-server/branches/upstream/current/doc/example_silcd.conf.in
silc-server/branches/upstream/current/includes/Makefile.am
silc-server/branches/upstream/current/includes/Makefile.in
silc-server/branches/upstream/current/includes/silc.h
silc-server/branches/upstream/current/includes/silcdistdefs.h
silc-server/branches/upstream/current/lib/Makefile.am
silc-server/branches/upstream/current/lib/Makefile.in
silc-server/branches/upstream/current/lib/contrib/Makefile.am
silc-server/branches/upstream/current/lib/contrib/Makefile.in
silc-server/branches/upstream/current/lib/silcapputil/Makefile.am
silc-server/branches/upstream/current/lib/silcapputil/Makefile.in
silc-server/branches/upstream/current/lib/silcasn1/Makefile.am
silc-server/branches/upstream/current/lib/silcasn1/Makefile.in
silc-server/branches/upstream/current/lib/silcasn1/silcasn1.c
silc-server/branches/upstream/current/lib/silcasn1/silcasn1_encode.c
silc-server/branches/upstream/current/lib/silccore/Makefile.am
silc-server/branches/upstream/current/lib/silccore/Makefile.in
silc-server/branches/upstream/current/lib/silccore/silcpacket.c
silc-server/branches/upstream/current/lib/silccore/silcpacket.h
silc-server/branches/upstream/current/lib/silccrypt/Makefile.am
silc-server/branches/upstream/current/lib/silccrypt/Makefile.in
silc-server/branches/upstream/current/lib/silchttp/Makefile.am
silc-server/branches/upstream/current/lib/silchttp/Makefile.in
silc-server/branches/upstream/current/lib/silcmath/Makefile.am
silc-server/branches/upstream/current/lib/silcmath/Makefile.in
silc-server/branches/upstream/current/lib/silcske/Makefile.am
silc-server/branches/upstream/current/lib/silcske/Makefile.in
silc-server/branches/upstream/current/lib/silcske/silcske.c
silc-server/branches/upstream/current/lib/silcskr/Makefile.am
silc-server/branches/upstream/current/lib/silcskr/Makefile.in
silc-server/branches/upstream/current/lib/silcutil/Makefile.am
silc-server/branches/upstream/current/lib/silcutil/Makefile.in
silc-server/branches/upstream/current/lib/silcutil/silcstack.c
silc-server/branches/upstream/current/lib/silcutil/silctypes.h
silc-server/branches/upstream/current/lib/silcutil/silcutil.c
Modified: silc-server/branches/upstream/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/ChangeLog?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/ChangeLog (original)
+++ silc-server/branches/upstream/current/ChangeLog Tue Oct 7 16:30:19 2008
@@ -1,17 +1,64 @@
-commit 4d26d9f598384d7cd49c6238ea4a81b9f4e6f212
+commit 8bb22be757768c18af7a5381b3b18d4983dfa9d4
Author: Pekka Riikonen <priikone at silcnet.org>
-Date: Sun Jun 22 17:42:40 2008 +0300
+Date: Wed Sep 24 17:56:56 2008 +0300
- Remove client from expired client list before deleting it
+ Disconnect problem: Mark incoming connections immediately local
+
+ This fixes the problem of SKE remaining running in the background
+ even though the conncection is closed because it was never aborted
+ because the connection wasn't marked local. After SKE timeout a
+ crash may occur.
-commit 32607f5db7ea3393765be5421e754ef191894dd5
+commit 35f90f6e65d24d42ba1988ff91f2842fe9c386b5
Author: Pekka Riikonen <priikone at silcnet.org>
-Date: Sun Jun 22 16:56:36 2008 +0300
+Date: Wed Sep 24 16:53:38 2008 +0300
- Fixed the silc_parse_userqfdn argument handling, again.
+ Fixed more backup router reconnecting problems
+
+ Fixed also possible buffer overflows.
- apps/silcd/command_reply.c | 2 ++
- apps/silcd/packet_receive.c | 7 ++++++-
- apps/silcd/server_util.c | 3 +++
- lib/silcutil/silcutil.c | 8 +++++---
- 4 files changed, 16 insertions(+), 4 deletions(-)
+commit 4647050fc1a99a44f4ffeb002c0ba1c353695ec0
+Author: Pekka Riikonen <priikone at localhost.localdomain>
+Date: Wed Sep 24 08:46:28 2008 +0300
+
+ Fixed server/backup router reconnecting
+
+commit 35135dcd998899182a78e7742b753c2bec72d923
+Author: Skywing <skywing at valhallalegends.com>
+Date: Fri Jun 20 17:37:21 2008 -0500
+
+ Make packet stream reference counts 32 bits.
+
+commit 55401f49c984e35e652eb590bdcefa07387ddd44
+Author: Skywing <skywing at valhallalegends.com>
+Date: Fri Jun 20 16:19:32 2008 -0500
+
+ Fix double free in silcd.
+
+commit 3661cbc69ce24b5230c8602b24927eb841933b5e
+Author: Kp <kp at valhallalegends.com>
+Date: Sun Jun 1 12:59:42 2008 -0500
+
+ Packet streams: avoid double free if silc_id_id2str fails.
+
+ In silc_packet_set_ids, the old ID is freed before silc_id_id2str is
+ called. If silc_id_id2str fails, then silc_packet_set_ids returns
+ without resetting the ID pointer. The pointer is then free, but not
+ NULL. When the packet stream is destroyed, silc_packet_stream_destroy
+ will free the pointer again. Reset the ID pointer to NULL immediately
+ after freeing it to prevent this.
+
+commit 7ebc6fcc9308c92130d59641b9f85341e609708b
+Author: Kp <kp at valhallalegends.com>
+Date: Sun Jun 1 12:25:50 2008 -0500
+
+ Packet streams: fix memory leak on dlist allocation failure.
+
+ If silc_dlist_init fails to allocate a SilcDList for stream->process,
+ then silc_packet_stream_link_va leaks the newly allocated
+ SilcPacketProcess. Fix that by calling silc_free(p) on the error path.
+
+ apps/silcd/command.c | 30 +++--
+ apps/silcd/server.c | 151 +++++++++++++++++++++----
+ apps/silcd/server_backup.c | 9 +-
+ apps/silcd/server_util.c | 11 ++-
Modified: silc-server/branches/upstream/current/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/Makefile.am (original)
+++ silc-server/branches/upstream/current/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./Makefile.ad file in the source tree.
# Source: ./Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/Makefile.in (original)
+++ silc-server/branches/upstream/current/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./Makefile.ad file in the source tree.
# Source: ./Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/apps/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/Makefile.am (original)
+++ silc-server/branches/upstream/current/apps/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./apps/Makefile.ad file in the source tree.
# Source: ./apps/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/apps/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/Makefile.in (original)
+++ silc-server/branches/upstream/current/apps/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./apps/Makefile.ad file in the source tree.
# Source: ./apps/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/apps/silcd/command.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/command.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/command.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/command.c Tue Oct 7 16:30:19 2008
@@ -1289,7 +1289,7 @@
/* Send invite list back only if the list was modified, or no arguments
was given. */
- type = 0;
+ ttype = 0;
argc = silc_argument_get_arg_num(cmd->args);
if (argc == 1)
ttype = 1;
@@ -1303,7 +1303,7 @@
2, tmp, len,
3, ttype && list ?
list->data : NULL,
- type && list ? silc_buffer_len(list) : 0);
+ ttype && list ? silc_buffer_len(list) : 0);
silc_buffer_free(list);
out:
@@ -1472,12 +1472,19 @@
/* Do normal signoff for the destination client */
sock = remote_client->connection;
+
+ if (sock)
+ silc_packet_stream_ref(sock);
+
silc_server_remove_from_channels(server, NULL, remote_client,
TRUE, (char *)"Killed", TRUE, TRUE);
silc_server_free_sock_user_data(server, sock, comment ? comment :
(unsigned char *)"Killed");
- if (sock)
+ if (sock) {
+ silc_packet_set_context(sock, NULL);
silc_server_close_connection(server, sock);
+ silc_packet_stream_unref(sock);
+ }
} else {
/* Router operator killing */
@@ -1557,12 +1564,13 @@
char info_string[256];
memset(info_string, 0, sizeof(info_string));
- snprintf(info_string, sizeof(info_string),
- "location: %s server: %s admin: %s <%s>",
- server->config->server_info->location,
- server->config->server_info->server_type,
- server->config->server_info->admin,
- server->config->server_info->email);
+ silc_snprintf(info_string, sizeof(info_string),
+ "location: %s server: %s admin: %s <%s> version: %s",
+ server->config->server_info->location,
+ server->config->server_info->server_type,
+ server->config->server_info->admin,
+ server->config->server_info->email,
+ silc_dist_version);
server_info = info_string;
entry = server->id_entry;
@@ -2821,7 +2829,7 @@
SilcServer server = cmd->server;
SilcClientEntry client = silc_packet_get_context(cmd->sock);
unsigned char *tmp_mask, m[4];
- SilcUInt32 mask = 0;
+ SilcUInt32 mask = 0, tmp_len;
SilcUInt16 ident = silc_command_get_ident(cmd->payload);
SilcBool set_mask = FALSE;
@@ -2831,8 +2839,8 @@
SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_UMODE, cmd, 1, 2);
/* Get the client's mode mask */
- tmp_mask = silc_argument_get_arg_type(cmd->args, 2, NULL);
- if (tmp_mask) {
+ tmp_mask = silc_argument_get_arg_type(cmd->args, 2, &tmp_len);
+ if (tmp_mask && tmp_len == 4) {
SILC_GET32_MSB(mask, tmp_mask);
set_mask = TRUE;
}
@@ -2945,7 +2953,7 @@
/* Get the channel mode mask */
tmp_mask = silc_argument_get_arg_type(cmd->args, 2, &tmp_len);
- if (tmp_mask) {
+ if (tmp_mask && tmp_len == 4) {
SILC_GET32_MSB(mode_mask, tmp_mask);
set_mask = TRUE;
}
Modified: silc-server/branches/upstream/current/apps/silcd/packet_send.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/packet_send.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/packet_send.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/packet_send.c Tue Oct 7 16:30:19 2008
@@ -771,6 +771,10 @@
va_start(ap, argc);
packet = silc_notify_payload_encode(type, argc, ap);
+ if (!packet) {
+ va_end(ap);
+ return;
+ }
silc_server_packet_send(server, sock, SILC_PACKET_NOTIFY,
broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
packet->data, silc_buffer_len(packet));
@@ -801,9 +805,10 @@
SilcBuffer packet;
packet = silc_notify_payload_encode_args(type, argc, args);
- silc_server_packet_send(server, sock, SILC_PACKET_NOTIFY,
- broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
- packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send(server, sock, SILC_PACKET_NOTIFY,
+ broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
+ packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
}
@@ -821,10 +826,11 @@
idp1 = silc_id_payload_encode((void *)old_id, SILC_ID_CHANNEL);
idp2 = silc_id_payload_encode((void *)new_id, SILC_ID_CHANNEL);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_CHANNEL_CHANGE,
- 2, idp1->data, silc_buffer_len(idp1),
- idp2->data, silc_buffer_len(idp2));
+ if (idp1 && idp2)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_CHANNEL_CHANGE,
+ 2, idp1->data, silc_buffer_len(idp1),
+ idp2->data, silc_buffer_len(idp2));
silc_buffer_free(idp1);
silc_buffer_free(idp2);
}
@@ -844,11 +850,12 @@
idp1 = silc_id_payload_encode((void *)old_id, SILC_ID_CLIENT);
idp2 = silc_id_payload_encode((void *)new_id, SILC_ID_CLIENT);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_NICK_CHANGE,
- 3, idp1->data, silc_buffer_len(idp1),
- idp2->data, silc_buffer_len(idp2),
- nickname, nickname ? strlen(nickname) : 0);
+ if (idp1 && idp2)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_NICK_CHANGE,
+ 3, idp1->data, silc_buffer_len(idp1),
+ idp2->data, silc_buffer_len(idp2),
+ nickname, nickname ? strlen(nickname) : 0);
silc_buffer_free(idp1);
silc_buffer_free(idp2);
}
@@ -866,9 +873,11 @@
idp1 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
idp2 = silc_id_payload_encode((void *)channel->id, SILC_ID_CHANNEL);
- silc_server_send_notify(server, sock, broadcast, SILC_NOTIFY_TYPE_JOIN,
- 2, idp1->data, silc_buffer_len(idp1),
- idp2->data, silc_buffer_len(idp2));
+
+ if (idp1 && idp2)
+ silc_server_send_notify(server, sock, broadcast, SILC_NOTIFY_TYPE_JOIN,
+ 2, idp1->data, silc_buffer_len(idp1),
+ idp2->data, silc_buffer_len(idp2));
silc_buffer_free(idp1);
silc_buffer_free(idp2);
}
@@ -885,9 +894,10 @@
SilcBuffer idp;
idp = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
- silc_server_send_notify_dest(server, sock, broadcast, (void *)channel->id,
- SILC_ID_CHANNEL, SILC_NOTIFY_TYPE_LEAVE,
- 1, idp->data, silc_buffer_len(idp));
+ if (idp)
+ silc_server_send_notify_dest(server, sock, broadcast, (void *)channel->id,
+ SILC_ID_CHANNEL, SILC_NOTIFY_TYPE_LEAVE,
+ 1, idp->data, silc_buffer_len(idp));
silc_buffer_free(idp);
}
@@ -910,6 +920,8 @@
unsigned char mode[4], ulimit[4];
idp = silc_id_payload_encode((void *)id, id_type);
+ if (!idp)
+ return;
SILC_PUT32_MSB(mode_mask, mode);
if (founder_key)
fkey = silc_public_key_payload_encode(founder_key);
@@ -955,6 +967,8 @@
idp1 = silc_id_payload_encode((void *)id, id_type);
idp2 = silc_id_payload_encode((void *)target, SILC_ID_CLIENT);
+ if (!idp1 || !idp2)
+ return;
SILC_PUT32_MSB(mode_mask, mode);
if (founder_key)
fkey = silc_public_key_payload_encode(founder_key);
@@ -986,10 +1000,11 @@
SilcBuffer idp;
idp = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_SIGNOFF,
- message ? 2 : 1, idp->data, silc_buffer_len(idp),
- message, message ? strlen(message): 0);
+ if (idp)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_SIGNOFF,
+ message ? 2 : 1, idp->data, silc_buffer_len(idp),
+ message, message ? strlen(message): 0);
silc_buffer_free(idp);
}
@@ -1008,12 +1023,13 @@
SilcBuffer idp;
idp = silc_id_payload_encode(id, id_type);
- silc_server_send_notify_dest(server, sock, broadcast,
- (void *)channel->id, SILC_ID_CHANNEL,
- SILC_NOTIFY_TYPE_TOPIC_SET,
- topic ? 2 : 1,
- idp->data, silc_buffer_len(idp),
- topic, topic ? strlen(topic) : 0);
+ if (idp)
+ silc_server_send_notify_dest(server, sock, broadcast,
+ (void *)channel->id, SILC_ID_CHANNEL,
+ SILC_NOTIFY_TYPE_TOPIC_SET,
+ topic ? 2 : 1,
+ idp->data, silc_buffer_len(idp),
+ topic, topic ? strlen(topic) : 0);
silc_buffer_free(idp);
}
@@ -1035,11 +1051,13 @@
idp1 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
idp2 = silc_id_payload_encode((void *)kicker, SILC_ID_CLIENT);
- silc_server_send_notify_dest(server, sock, broadcast, (void *)channel->id,
- SILC_ID_CHANNEL, SILC_NOTIFY_TYPE_KICKED, 3,
- idp1->data, silc_buffer_len(idp1),
- comment, comment ? strlen(comment) : 0,
- idp2->data, silc_buffer_len(idp2));
+
+ if (idp1 && idp2)
+ silc_server_send_notify_dest(server, sock, broadcast, (void *)channel->id,
+ SILC_ID_CHANNEL, SILC_NOTIFY_TYPE_KICKED, 3,
+ idp1->data, silc_buffer_len(idp1),
+ comment, comment ? strlen(comment) : 0,
+ idp2->data, silc_buffer_len(idp2));
silc_buffer_free(idp1);
silc_buffer_free(idp2);
}
@@ -1060,11 +1078,13 @@
idp1 = silc_id_payload_encode(client_id, SILC_ID_CLIENT);
idp2 = silc_id_payload_encode(killer, killer_type);
- silc_server_send_notify_dest(server, sock, broadcast, (void *)client_id,
- SILC_ID_CLIENT, SILC_NOTIFY_TYPE_KILLED,
- 3, idp1->data, silc_buffer_len(idp1),
- comment, comment ? strlen(comment) : 0,
- idp2->data, silc_buffer_len(idp2));
+
+ if (idp1 && idp2)
+ silc_server_send_notify_dest(server, sock, broadcast, (void *)client_id,
+ SILC_ID_CLIENT, SILC_NOTIFY_TYPE_KILLED,
+ 3, idp1->data, silc_buffer_len(idp1),
+ comment, comment ? strlen(comment) : 0,
+ idp2->data, silc_buffer_len(idp2));
silc_buffer_free(idp1);
silc_buffer_free(idp2);
}
@@ -1085,10 +1105,11 @@
idp = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
SILC_PUT32_MSB(mode_mask, mode);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_UMODE_CHANGE, 2,
- idp->data, silc_buffer_len(idp),
- mode, 4);
+ if (idp)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_UMODE_CHANGE, 2,
+ idp->data, silc_buffer_len(idp),
+ mode, 4);
silc_buffer_free(idp);
}
@@ -1106,12 +1127,14 @@
SilcBuffer idp;
idp = silc_id_payload_encode((void *)channel->id, SILC_ID_CHANNEL);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_BAN, 3,
- idp->data, silc_buffer_len(idp),
- action ? action : NULL, action ? 1 : 0,
- list ? list->data : NULL,
- list ? silc_buffer_len(list) : 0);
+
+ if (idp)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_BAN, 3,
+ idp->data, silc_buffer_len(idp),
+ action ? action : NULL, action ? 1 : 0,
+ list ? list->data : NULL,
+ list ? silc_buffer_len(list) : 0);
silc_buffer_free(idp);
}
@@ -1132,14 +1155,17 @@
idp = silc_id_payload_encode((void *)channel->id, SILC_ID_CHANNEL);
idp2 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
- silc_server_send_notify(server, sock, broadcast,
- SILC_NOTIFY_TYPE_INVITE, 5,
- idp->data, silc_buffer_len(idp),
- channel->channel_name, strlen(channel->channel_name),
- idp2->data, silc_buffer_len(idp2),
- action ? action : NULL, action ? 1 : 0,
- list ? list->data : NULL,
- list ? silc_buffer_len(list) : 0);
+
+ if (idp && idp2)
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_INVITE, 5,
+ idp->data, silc_buffer_len(idp),
+ channel->channel_name,
+ strlen(channel->channel_name),
+ idp2->data, silc_buffer_len(idp2),
+ action ? action : NULL, action ? 1 : 0,
+ list ? list->data : NULL,
+ list ? silc_buffer_len(list) : 0);
silc_buffer_free(idp);
silc_buffer_free(idp2);
}
@@ -1159,6 +1185,8 @@
unsigned char mode[4], n[2];
idp = silc_id_payload_encode(client->id, SILC_ID_CLIENT);
+ if (!idp)
+ return;
SILC_PUT16_MSB(type, n);
SILC_PUT32_MSB(client->mode, mode);
if (public_key)
@@ -1192,6 +1220,10 @@
va_start(ap, argc);
packet = silc_notify_payload_encode(type, argc, ap);
+ if (!packet) {
+ va_end(ap);
+ return;
+ }
silc_server_packet_send_dest(server, sock, SILC_PACKET_NOTIFY,
broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
dest_id, dest_id_type,
@@ -1232,10 +1264,11 @@
va_start(ap, argc);
packet = silc_notify_payload_encode(type, argc, ap);
- silc_server_packet_send_to_channel(server, sender, channel,
- SILC_PACKET_NOTIFY, route_notify,
- send_to_clients,
- packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send_to_channel(server, sender, channel,
+ SILC_PACKET_NOTIFY, route_notify,
+ send_to_clients,
+ packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
va_end(ap);
}
@@ -1277,6 +1310,10 @@
va_start(ap, argc);
packet = silc_notify_payload_encode(type, argc, ap);
+ if (!packet) {
+ va_end(ap);
+ return;
+ }
data = packet->data;
data_len = silc_buffer_len(packet);
@@ -1370,9 +1407,10 @@
SILC_LOG_DEBUG(("Sending new ID"));
idp = silc_id_payload_encode(id, id_type);
- silc_server_packet_send(server, sock, SILC_PACKET_NEW_ID,
- broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
- idp->data, silc_buffer_len(idp));
+ if (idp)
+ silc_server_packet_send(server, sock, SILC_PACKET_NEW_ID,
+ broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
+ idp->data, silc_buffer_len(idp));
silc_buffer_free(idp);
}
@@ -1401,10 +1439,10 @@
/* Encode the channel payload */
packet = silc_channel_payload_encode(channel_name, name_len,
cid, channel_id_len, mode);
-
- silc_server_packet_send(server, sock, SILC_PACKET_NEW_CHANNEL,
- broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
- packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send(server, sock, SILC_PACKET_NEW_CHANNEL,
+ broadcast ? SILC_PACKET_FLAG_BROADCAST : 0,
+ packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
}
@@ -1468,8 +1506,9 @@
va_start(ap, argc);
packet = silc_command_payload_encode_vap(command, ident, argc, ap);
- silc_server_packet_send(server, sock, SILC_PACKET_COMMAND, 0,
- packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send(server, sock, SILC_PACKET_COMMAND, 0,
+ packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
va_end(ap);
}
@@ -1495,8 +1534,9 @@
packet = silc_command_reply_payload_encode_vap(command, status, error,
ident, argc, ap);
- silc_server_packet_send(server, sock, SILC_PACKET_COMMAND_REPLY, 0,
- packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send(server, sock, SILC_PACKET_COMMAND_REPLY, 0,
+ packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
va_end(ap);
}
@@ -1524,9 +1564,10 @@
packet = silc_command_reply_payload_encode_vap(command, status, error,
ident, argc, ap);
- silc_server_packet_send_dest(server, sock, SILC_PACKET_COMMAND_REPLY, 0,
- dst_id, dst_id_type, packet->data,
- silc_buffer_len(packet));
+ if (packet)
+ silc_server_packet_send_dest(server, sock, SILC_PACKET_COMMAND_REPLY, 0,
+ dst_id, dst_id_type, packet->data,
+ silc_buffer_len(packet));
silc_buffer_free(packet);
va_end(ap);
}
@@ -1541,6 +1582,9 @@
SilcBuffer packet;
packet = silc_buffer_alloc(4);
+ if (!packet)
+ return;
+
silc_buffer_pull_tail(packet, silc_buffer_truelen(packet));
silc_buffer_format(packet,
SILC_STR_UI_SHORT(conn_type),
@@ -1714,8 +1758,9 @@
va_start(ap, argc);
packet = silc_notify_payload_encode(type, argc, ap);
- silc_server_send_opers(server, SILC_PACKET_NOTIFY, 0,
- route, local, packet->data, silc_buffer_len(packet));
+ if (packet)
+ silc_server_send_opers(server, SILC_PACKET_NOTIFY, 0,
+ route, local, packet->data, silc_buffer_len(packet));
silc_buffer_free(packet);
va_end(ap);
}
Modified: silc-server/branches/upstream/current/apps/silcd/server.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/server.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/server.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/server.c Tue Oct 7 16:30:19 2008
@@ -201,6 +201,8 @@
if (server->router_conn && server->router_conn->sock == stream &&
!server->router && server->standalone) {
+ if (idata->sconn && idata->sconn->callback)
+ (*idata->sconn->callback)(server, NULL, idata->sconn->callback_context);
silc_server_create_connections(server);
silc_server_free_sock_user_data(server, stream, NULL);
} else {
@@ -212,6 +214,8 @@
server->backup_closed = TRUE;
}
+ if (idata->sconn && idata->sconn->callback)
+ (*idata->sconn->callback)(server, NULL, idata->sconn->callback_context);
silc_server_free_sock_user_data(server, stream, NULL);
}
@@ -239,6 +243,8 @@
server->backup_closed = TRUE;
}
+ if (idata->sconn && idata->sconn->callback)
+ (*idata->sconn->callback)(server, NULL, idata->sconn->callback_context);
silc_server_free_sock_user_data(server, stream, NULL);
}
@@ -1322,7 +1328,8 @@
sconn->no_conf = dynamic;
sconn->server = server;
- SILC_LOG_DEBUG(("Created connection %p", sconn));
+ SILC_LOG_DEBUG(("Created connection %p to %s:%d", sconn,
+ remote_host, port));
silc_schedule_task_add_timeout(server->schedule, silc_server_connect_router,
sconn, 0, 0);
@@ -1353,7 +1360,15 @@
if (success == FALSE) {
/* Authentication failed */
- /* XXX retry connecting */
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
@@ -1448,6 +1463,15 @@
SILC_ID_SERVER),
NULL, sconn->sock);
if (!id_entry) {
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_free_sock_user_data(server, sconn->sock, NULL);
@@ -1462,6 +1486,7 @@
idata->status |= (SILC_IDLIST_STATUS_REGISTERED |
SILC_IDLIST_STATUS_LOCAL);
idata->sconn = sconn;
+ idata->sconn->callback = NULL;
/* Statistics */
server->stat.my_routers++;
@@ -1506,8 +1531,9 @@
silc_server_backup_add(server, server->id_entry, ip,
sconn->remote_port, TRUE);
}
+ }
#if 0
- } else {
+ else {
/* We already have primary router. Disconnect this connection */
SILC_LOG_DEBUG(("We already have primary router, disconnect"));
silc_idlist_del_server(server->global_list, id_entry);
@@ -1517,8 +1543,8 @@
silc_server_disconnect_remote(server, sconn->sock,
SILC_STATUS_ERR_RESOURCE_LIMIT, NULL);
return;
+ }
#endif /* 0 */
- }
} else {
/* Add this server to be our backup router */
id_entry->server_type = SILC_BACKUP_ROUTER;
@@ -1573,9 +1599,9 @@
{
SilcPacketStream sock = context;
SilcUnknownEntry entry = silc_packet_get_context(sock);
- SilcServerConnection sconn = entry->data.sconn;
- SilcServer server = entry->server;
- SilcServerConfigRouter *conn = sconn->conn.ref_ptr;
+ SilcServerConnection sconn;
+ SilcServer server;
+ SilcServerConfigRouter *conn;
SilcAuthMethod auth_meth = SILC_AUTH_NONE;
void *auth_data = NULL;
SilcUInt32 auth_data_len = 0;
@@ -1584,17 +1610,28 @@
SilcHmac hmac_send, hmac_receive;
SilcHash hash;
+ server = entry->server;
+ sconn = entry->data.sconn;
+ conn = sconn->conn.ref_ptr;
+ entry->op = NULL;
+
SILC_LOG_DEBUG(("Connection %p, SKE completed, entry %p", sconn, entry));
-
- entry->op = NULL;
if (status != SILC_SKE_STATUS_OK) {
/* SKE failed */
SILC_LOG_ERROR(("Error (%s) during Key Exchange protocol with %s (%s)",
silc_ske_map_status(status), entry->hostname, entry->ip));
-
- /* XXX retry connecting */
silc_ske_free(ske);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_free_sock_user_data(server, sconn->sock, NULL);
@@ -1608,11 +1645,18 @@
/* Set the keys into use. The data will be encrypted after this. */
if (!silc_ske_set_keys(ske, keymat, prop, &send_key, &receive_key,
&hmac_send, &hmac_receive, &hash)) {
-
- /* XXX retry connecting */
+ silc_ske_free(ske);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
/* Error setting keys */
- silc_ske_free(ske);
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_free_sock_user_data(server, sconn->sock, NULL);
@@ -1628,10 +1672,18 @@
connauth = silc_connauth_alloc(server->schedule, ske,
server->config->conn_auth_timeout);
if (!connauth) {
- /* XXX retry connecting */
+ silc_ske_free(ske);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
/** Error allocating auth protocol */
- silc_ske_free(ske);
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_free_sock_user_data(server, sconn->sock, NULL);
@@ -1688,6 +1740,16 @@
if (!sconn->sock) {
SILC_LOG_ERROR(("Cannot connect: cannot create packet stream"));
silc_stream_destroy(sconn->stream);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_connection_free(sconn);
@@ -1698,9 +1760,19 @@
/* Set source ID to packet stream */
if (!silc_packet_set_ids(sconn->sock, SILC_ID_SERVER, server->id,
0, NULL)) {
+ silc_packet_stream_destroy(sconn->sock);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
- silc_packet_stream_destroy(sconn->sock);
silc_server_connection_free(sconn);
return;
}
@@ -1709,6 +1781,18 @@
entry = silc_calloc(1, sizeof(*entry));
if (!entry) {
silc_packet_stream_destroy(sconn->sock);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
+ if (sconn->callback)
+ (*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_connection_free(sconn);
return;
}
@@ -1731,9 +1815,19 @@
server->public_key, server->private_key, sconn);
if (!ske) {
silc_free(entry);
+ silc_packet_stream_destroy(sconn->sock);
+
+ /* Try reconnecting if configuration wants it */
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ return;
+ }
+
if (sconn->callback)
(*sconn->callback)(server, NULL, sconn->callback_context);
- silc_packet_stream_destroy(sconn->sock);
silc_server_connection_free(sconn);
return;
}
@@ -1776,7 +1870,7 @@
/* If we've reached max retry count, give up. */
if ((sconn->retry_count > param->reconnect_count) &&
- !param->reconnect_keep_trying) {
+ sconn->no_reconnect) {
SILC_LOG_ERROR(("Could not connect, giving up"));
if (sconn->callback)
@@ -1823,10 +1917,16 @@
SILC_LOG_ERROR(("Could not connect to %s:%d: %s",
sconn->remote_host, sconn->remote_port,
silc_net_get_error_string(status)));
-
- if (sconn->callback)
- (*sconn->callback)(server, NULL, sconn->callback_context);
- silc_server_connection_free(sconn);
+ if (!sconn->no_reconnect) {
+ silc_schedule_task_add_timeout(sconn->server->schedule,
+ silc_server_connect_to_router_retry,
+ sconn, 1, 0);
+ silc_dlist_del(server->conns, sconn);
+ } else {
+ if (sconn->callback)
+ (*sconn->callback)(server, NULL, sconn->callback_context);
+ silc_server_connection_free(sconn);
+ }
break;
default:
@@ -1877,6 +1977,8 @@
SILC_LOG_INFO(("Unconfigured %s connection %s:%d, cannot connect",
(sconn->backup ? "backup router" : "router"),
sconn->remote_host, sconn->remote_port));
+ if (sconn->callback)
+ (*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_connection_free(sconn);
return;
}
@@ -1893,6 +1995,8 @@
if (!sconn->op) {
SILC_LOG_ERROR(("Could not connect to router %s:%d",
sconn->remote_host, sconn->remote_port));
+ if (sconn->callback)
+ (*sconn->callback)(server, NULL, sconn->callback_context);
silc_server_connection_free(sconn);
return;
}
@@ -1911,6 +2015,7 @@
SilcServer server = context;
SilcServerConnection sconn;
SilcServerConfigRouter *ptr;
+ SilcServerConfigConnParams *param;
/* Don't connect if we are shutting down. */
if (server->server_shutdown)
@@ -1986,6 +2091,8 @@
}
}
+ param = (ptr->param ? ptr->param : &server->config->param);
+
/* Allocate connection object for hold connection specific stuff. */
sconn = silc_calloc(1, sizeof(*sconn));
if (!sconn)
@@ -1998,6 +2105,7 @@
sconn->backup_replace_ip = strdup(ptr->backup_replace_ip);
sconn->backup_replace_port = ptr->backup_replace_port;
}
+ sconn->no_reconnect = param->reconnect_keep_trying == FALSE;
SILC_LOG_DEBUG(("Created connection %p", sconn));
@@ -2498,6 +2606,7 @@
sconn->remote_port = port;
silc_dlist_add(server->conns, sconn);
idata->sconn = sconn;
+ idata->sconn->callback = NULL;
idata->last_receive = time(NULL);
/* Add the common data structure to the ID entry. */
@@ -2712,6 +2821,7 @@
entry->port = port;
entry->server = server;
entry->data.conn_type = SILC_CONN_UNKNOWN;
+ entry->data.status |= SILC_IDLIST_STATUS_LOCAL;
silc_packet_set_context(packet_stream, entry);
SILC_LOG_DEBUG(("Created unknown connection %p", entry));
@@ -3153,7 +3263,7 @@
/* We'll need to constantly try to reconnect to the primary
router so that we'll see when it comes back online. */
- silc_server_create_connection(server, FALSE, FALSE, ip, port,
+ silc_server_create_connection(server, TRUE, FALSE, ip, port,
silc_server_backup_connected,
NULL);
}
Modified: silc-server/branches/upstream/current/apps/silcd/server_backup.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/server_backup.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/server_backup.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/server_backup.c Tue Oct 7 16:30:19 2008
@@ -786,11 +786,16 @@
SilcServer server = app_context;
SilcServerConfigRouter *primary;
+ SILC_LOG_DEBUG(("Reconnecting"));
+
+ if (server->server_shutdown)
+ return;
+
primary = silc_server_config_get_primary_router(server);
if (primary) {
if (!silc_server_find_socket_by_host(server, SILC_CONN_ROUTER,
primary->host, primary->port))
- silc_server_create_connection(server, FALSE, FALSE,
+ silc_server_create_connection(server, TRUE, FALSE,
primary->host, primary->port,
silc_server_backup_connected,
context);
@@ -810,6 +815,7 @@
if (!server_entry) {
/* Try again */
+ SILC_LOG_DEBUG(("Connecting failed"));
silc_schedule_task_add_timeout(server->schedule,
silc_server_backup_connected_again,
context, 5, 0);
@@ -840,7 +846,7 @@
if (primary) {
if (!silc_server_find_socket_by_host(server, SILC_CONN_ROUTER,
primary->host, primary->port))
- silc_server_create_connection(server, FALSE, FALSE,
+ silc_server_create_connection(server, TRUE, FALSE,
primary->host, primary->port,
silc_server_backup_connect_primary,
context);
@@ -1040,7 +1046,7 @@
SILC_LOG_DEBUG(("Received START (session %d), reconnect to router",
ctx->session));
silc_packet_stream_ref(ctx->sock);
- silc_server_create_connection(server, FALSE, FALSE,
+ silc_server_create_connection(server, TRUE, FALSE,
primary->host, primary->port,
silc_server_backup_connect_primary,
ctx->sock);
Modified: silc-server/branches/upstream/current/apps/silcd/server_util.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/server_util.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/server_util.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/server_util.c Tue Oct 7 16:30:19 2008
@@ -1547,8 +1547,17 @@
if (remote_client->connection) {
/* Remove locally conneted client */
SilcPacketStream sock = remote_client->connection;
+
+ if (sock)
+ silc_packet_stream_ref(sock);
+
silc_server_free_sock_user_data(server, sock, NULL);
- silc_server_close_connection(server, sock);
+
+ if (sock) {
+ silc_packet_set_context(sock, NULL);
+ silc_server_close_connection(server, sock);
+ silc_packet_stream_unref(sock);
+ }
} else {
/* Update statistics */
server->stat.clients--;
Modified: silc-server/branches/upstream/current/apps/silcd/silc-server.spec
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/silc-server.spec?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/silc-server.spec (original)
+++ silc-server/branches/upstream/current/apps/silcd/silc-server.spec Tue Oct 7 16:30:19 2008
@@ -1,6 +1,6 @@
Summary: SILC Server
Name: silc-server
-Version: 1.1.11
+Version: 1.1.13
Release: 0.fc8
License: GPL
Group: Applications/Communications
Modified: silc-server/branches/upstream/current/apps/silcd/silcd.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/apps/silcd/silcd.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/apps/silcd/silcd.c (original)
+++ silc-server/branches/upstream/current/apps/silcd/silcd.c Tue Oct 7 16:30:19 2008
@@ -745,8 +745,8 @@
silc_file_writefile(pidfile, buf, strlen(buf));
}
- silc_server_drop_privs(silcd);
- }
+ }
+ silc_server_drop_privs(silcd);
/* Run the server. When this returns the server has been stopped
and we will exit. */
Modified: silc-server/branches/upstream/current/config.guess
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/config.guess?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/config.guess (original)
+++ silc-server/branches/upstream/current/config.guess Tue Oct 7 16:30:19 2008
@@ -1,10 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-05-17'
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-13'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -107,7 +106,7 @@
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -161,7 +160,6 @@
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -208,11 +206,8 @@
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -330,7 +325,7 @@
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
+ i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -769,19 +764,12 @@
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- *:MINGW*:*)
+ i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -791,15 +779,9 @@
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -833,9 +815,6 @@
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
@@ -872,11 +851,7 @@
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -895,11 +870,7 @@
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -953,9 +924,6 @@
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -999,7 +967,7 @@
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ #if defined(__INTEL_COMPILER) || defined(__PGI)
LIBC=gnu
#else
LIBC=gnuaout
@@ -1009,11 +977,7 @@
LIBC=dietlibc
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1214,15 +1178,6 @@
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
Modified: silc-server/branches/upstream/current/config.sub
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/config.sub?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/config.sub (original)
+++ silc-server/branches/upstream/current/config.sub Tue Oct 7 16:30:19 2008
@@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-04-29'
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -241,16 +240,15 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -270,23 +268,24 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
- | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -318,18 +317,18 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
+ | avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32c-* | m32r-* | m32rle-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -351,27 +350,28 @@
| mmix-* \
| mt-* \
| msp430-* \
- | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
+ ;;
+ m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -682,10 +682,6 @@
mingw32)
basic_machine=i386-pc
os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
@@ -822,12 +818,6 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -914,10 +904,6 @@
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -928,9 +914,6 @@
sh)
basic_machine=sh-hitachi
os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
@@ -1137,7 +1120,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1210,8 +1193,7 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1226,7 +1208,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1378,12 +1360,6 @@
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
*-acorn)
os=-riscix1.2
;;
@@ -1393,9 +1369,9 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1420,9 +1396,6 @@
;;
m68*-cisco)
os=-aout
- ;;
- mep-*)
- os=-elf
;;
mips*-cisco)
os=-elf
Modified: silc-server/branches/upstream/current/configure
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/configure?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/configure (original)
+++ silc-server/branches/upstream/current/configure Tue Oct 7 16:30:19 2008
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Server 1.1.11.
+# Generated by GNU Autoconf 2.61 for Server 1.1.13.
#
# Report bugs to <silc-devel at lists.silcnet.org>.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='Server'
PACKAGE_TARNAME='silc-server'
-PACKAGE_VERSION='1.1.11'
-PACKAGE_STRING='Server 1.1.11'
+PACKAGE_VERSION='1.1.13'
+PACKAGE_STRING='Server 1.1.13'
PACKAGE_BUGREPORT='silc-devel at lists.silcnet.org'
# Factoring default headers for most tests.
@@ -1474,7 +1474,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Server 1.1.11 to adapt to many kinds of systems.
+\`configure' configures Server 1.1.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1545,7 +1545,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Server 1.1.11:";;
+ short | recursive ) echo "Configuration of Server 1.1.13:";;
esac
cat <<\_ACEOF
@@ -1668,7 +1668,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Server configure 1.1.11
+Server configure 1.1.13
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1682,7 +1682,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Server $as_me 1.1.11, which was
+It was created by Server $as_me 1.1.13, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2498,7 +2498,7 @@
# Define the identity of the package.
PACKAGE='silc-server'
- VERSION='1.1.11'
+ VERSION='1.1.13'
cat >>confdefs.h <<_ACEOF
@@ -31728,7 +31728,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Server $as_me 1.1.11, which was
+This file was extended by Server $as_me 1.1.13, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31781,7 +31781,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-Server config.status 1.1.11
+Server config.status 1.1.13
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Modified: silc-server/branches/upstream/current/configure.ac
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/configure.ac?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/configure.ac (original)
+++ silc-server/branches/upstream/current/configure.ac Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the configure.ad file in the source tree.
# Source: configure.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
@@ -23,7 +23,7 @@
# GNU General Public License for more details.
#
-AC_INIT([Server], [1.1.11], [silc-devel at lists.silcnet.org], [silc-server])
+AC_INIT([Server], [1.1.13], [silc-devel at lists.silcnet.org], [silc-server])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE
AC_PREREQ(2.52)
Modified: silc-server/branches/upstream/current/doc/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/doc/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/doc/Makefile.am (original)
+++ silc-server/branches/upstream/current/doc/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./doc/Makefile.ad file in the source tree.
# Source: ./doc/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/doc/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/doc/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/doc/Makefile.in (original)
+++ silc-server/branches/upstream/current/doc/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./doc/Makefile.ad file in the source tree.
# Source: ./doc/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/doc/example_silcd.conf
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/doc/example_silcd.conf?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/doc/example_silcd.conf (original)
+++ silc-server/branches/upstream/current/doc/example_silcd.conf Tue Oct 7 16:30:19 2008
@@ -190,10 +190,12 @@
#
# Primary listener. Specify the IP address and the port to bind
- # the server.
+ # the server. The public_ip can be used to specify the public IP
+ # if the server is behind NAT.
#
Primary {
ip = "10.2.1.6";
+ # public_ip = "11.1.1.1";
port = 706;
};
Modified: silc-server/branches/upstream/current/doc/example_silcd.conf.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/doc/example_silcd.conf.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/doc/example_silcd.conf.in (original)
+++ silc-server/branches/upstream/current/doc/example_silcd.conf.in Tue Oct 7 16:30:19 2008
@@ -190,10 +190,12 @@
#
# Primary listener. Specify the IP address and the port to bind
- # the server.
+ # the server. The public_ip can be used to specify the public IP
+ # if the server is behind NAT.
#
Primary {
ip = "10.2.1.6";
+ # public_ip = "11.1.1.1";
port = 706;
};
Modified: silc-server/branches/upstream/current/includes/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/includes/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/includes/Makefile.am (original)
+++ silc-server/branches/upstream/current/includes/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./includes/Makefile.ad file in the source tree.
# Source: ./includes/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/includes/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/includes/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/includes/Makefile.in (original)
+++ silc-server/branches/upstream/current/includes/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./includes/Makefile.ad file in the source tree.
# Source: ./includes/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/includes/silc.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/includes/silc.h?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/includes/silc.h (original)
+++ silc-server/branches/upstream/current/includes/silc.h Tue Oct 7 16:30:19 2008
@@ -64,7 +64,7 @@
/* Compilation time defines, for third-party software */
#define __SILC_HAVE_PTHREAD 1
-#define __SILC_ENABLE_DEBUG 1
+
#if defined(HAVE_SILCDEFS_H)
/* Automatically generated configuration header */
Modified: silc-server/branches/upstream/current/includes/silcdistdefs.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/includes/silcdistdefs.h?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/includes/silcdistdefs.h (original)
+++ silc-server/branches/upstream/current/includes/silcdistdefs.h Tue Oct 7 16:30:19 2008
@@ -1,7 +1,7 @@
/*
Automatically generated by Autodist 1.4. Do not edit.
- Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+ Generated: Thu Sep 25 14:05:01 EEST 2008 by priikone
Distribution: Server
License:
*/
Modified: silc-server/branches/upstream/current/lib/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/Makefile.ad file in the source tree.
# Source: ./lib/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/Makefile.ad file in the source tree.
# Source: ./lib/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:02 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/contrib/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/contrib/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/contrib/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/contrib/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/contrib/Makefile.ad file in the source tree.
# Source: ./lib/contrib/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/contrib/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/contrib/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/contrib/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/contrib/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/contrib/Makefile.ad file in the source tree.
# Source: ./lib/contrib/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcapputil/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcapputil/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcapputil/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcapputil/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcapputil/Makefile.ad file in the source tree.
# Source: ./lib/silcapputil/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcapputil/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcapputil/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcapputil/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcapputil/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcapputil/Makefile.ad file in the source tree.
# Source: ./lib/silcapputil/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcasn1/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcasn1/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcasn1/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcasn1/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcasn1/Makefile.ad file in the source tree.
# Source: ./lib/silcasn1/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcasn1/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcasn1/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcasn1/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcasn1/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcasn1/Makefile.ad file in the source tree.
# Source: ./lib/silcasn1/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcasn1/silcasn1.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcasn1/silcasn1.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcasn1/silcasn1.c (original)
+++ silc-server/branches/upstream/current/lib/silcasn1/silcasn1.c Tue Oct 7 16:30:19 2008
@@ -53,7 +53,7 @@
asn1->stack2 = silc_stack_alloc(768);
if (!asn1->stack2) {
- silc_stack_free(asn1->stack2);
+ silc_stack_free(asn1->stack1);
return FALSE;
}
Modified: silc-server/branches/upstream/current/lib/silcasn1/silcasn1_encode.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcasn1/silcasn1_encode.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcasn1/silcasn1_encode.c (original)
+++ silc-server/branches/upstream/current/lib/silcasn1/silcasn1_encode.c Tue Oct 7 16:30:19 2008
@@ -351,7 +351,7 @@
/* Get OID words from the string */
cp = strchr(oidstr, '.');
while (cp) {
- if (sscanf(oidstr, "%lu", (unsigned long *)&oid) != 1) {
+ if (sscanf(oidstr, "%u", &oid) != 1) {
SILC_LOG_DEBUG(("Malformed OID string"));
goto fail;
}
@@ -362,7 +362,7 @@
cp = strchr(oidstr, '.');
if (!cp) {
- if (sscanf(oidstr, "%lu", (unsigned long *)&oid) != 1) {
+ if (sscanf(oidstr, "%u", &oid) != 1) {
SILC_LOG_DEBUG(("Malformed OID string"));
goto fail;
}
Modified: silc-server/branches/upstream/current/lib/silccore/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccore/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccore/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silccore/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silccore/Makefile.ad file in the source tree.
# Source: ./lib/silccore/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silccore/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccore/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccore/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silccore/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silccore/Makefile.ad file in the source tree.
# Source: ./lib/silccore/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silccore/silcpacket.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccore/silcpacket.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccore/silcpacket.c (original)
+++ silc-server/branches/upstream/current/lib/silccore/silcpacket.c Tue Oct 7 16:30:19 2008
@@ -40,7 +40,7 @@
SilcMutex lock; /* Engine lock */
SilcRng rng; /* RNG for engine */
SilcHashTable contexts; /* Per scheduler contexts */
- SilcPacketCallbacks *callbacks; /* Packet callbacks */
+ const SilcPacketCallbacks *callbacks; /* Packet callbacks */
void *callback_context; /* Context for callbacks */
SilcList streams; /* All streams in engine */
SilcList packet_pool; /* Free list for received packets */
@@ -51,7 +51,7 @@
/* Packet processor context */
typedef struct SilcPacketProcessStruct {
SilcPacketType *types; /* Packets to process */
- SilcPacketCallbacks *callbacks; /* Callbacks or NULL */
+ const SilcPacketCallbacks *callbacks; /* Callbacks or NULL */
void *callback_context;
SilcInt32 priority; /* Priority */
} *SilcPacketProcess;
@@ -81,7 +81,7 @@
unsigned char *dst_id; /* Destination ID */
SilcUInt32 send_psn; /* Sending sequence */
SilcUInt32 receive_psn; /* Receiving sequence */
- SilcAtomic8 refcnt; /* Reference counter */
+ SilcAtomic32 refcnt; /* Reference counter */
SilcUInt8 sid; /* Security ID, set if IV included */
unsigned int src_id_len : 6;
unsigned int src_id_type : 2;
@@ -540,7 +540,7 @@
SilcPacketEngine
silc_packet_engine_start(SilcRng rng, SilcBool router,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context)
{
SilcPacketEngine engine;
@@ -621,7 +621,7 @@
silc_free(engine);
}
-static const char *packet_error[] = {
+static const char * const packet_error[] = {
"Cannot read from stream",
"Cannot write to stream",
"Packet MAC failed",
@@ -695,7 +695,7 @@
return NULL;
ps->stream = stream;
- silc_atomic_init8(&ps->refcnt, 1);
+ silc_atomic_init32(&ps->refcnt, 1);
silc_mutex_alloc(&ps->lock);
/* Allocate out buffer */
@@ -816,7 +816,7 @@
return NULL;
ps->sc = stream->sc;
- silc_atomic_init8(&ps->refcnt, 1);
+ silc_atomic_init32(&ps->refcnt, 1);
silc_mutex_alloc(&ps->lock);
/* Set the UDP packet stream as underlaying stream */
@@ -884,7 +884,7 @@
if (!stream)
return;
- if (silc_atomic_sub_int8(&stream->refcnt, 1) > 0) {
+ if (silc_atomic_sub_int32(&stream->refcnt, 1) > 0) {
if (stream->destroyed)
return;
stream->destroyed = TRUE;
@@ -972,7 +972,7 @@
silc_free(stream->src_id);
silc_free(stream->dst_id);
- silc_atomic_uninit8(&stream->refcnt);
+ silc_atomic_uninit32(&stream->refcnt);
silc_mutex_free(stream->lock);
silc_free(stream);
}
@@ -1001,7 +1001,7 @@
/* Links `callbacks' to `stream' for specified packet types */
static SilcBool silc_packet_stream_link_va(SilcPacketStream stream,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context,
int priority, va_list ap)
{
@@ -1030,6 +1030,7 @@
stream->process = silc_dlist_init();
if (!stream->process) {
silc_mutex_unlock(stream->lock);
+ silc_free(p);
return FALSE;
}
}
@@ -1079,7 +1080,7 @@
/* Links `callbacks' to `stream' for specified packet types */
SilcBool silc_packet_stream_link(SilcPacketStream stream,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context,
int priority, ...)
{
@@ -1097,7 +1098,7 @@
/* Unlinks `callbacks' from `stream'. */
void silc_packet_stream_unlink(SilcPacketStream stream,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context)
{
SilcPacketProcess p;
@@ -1153,10 +1154,10 @@
void silc_packet_stream_ref(SilcPacketStream stream)
{
- silc_atomic_add_int8(&stream->refcnt, 1);
+ silc_atomic_add_int32(&stream->refcnt, 1);
SILC_LOG_DEBUG(("Stream %p, refcnt %d->%d", stream,
- silc_atomic_get_int8(&stream->refcnt) - 1,
- silc_atomic_get_int8(&stream->refcnt)));
+ silc_atomic_get_int32(&stream->refcnt) - 1,
+ silc_atomic_get_int32(&stream->refcnt)));
}
/* Unreference packet stream */
@@ -1164,11 +1165,11 @@
void silc_packet_stream_unref(SilcPacketStream stream)
{
SILC_LOG_DEBUG(("Stream %p, refcnt %d->%d", stream,
- silc_atomic_get_int8(&stream->refcnt),
- silc_atomic_get_int8(&stream->refcnt) - 1));
- if (silc_atomic_sub_int8(&stream->refcnt, 1) > 0)
+ silc_atomic_get_int32(&stream->refcnt),
+ silc_atomic_get_int32(&stream->refcnt) - 1));
+ if (silc_atomic_sub_int32(&stream->refcnt, 1) > 0)
return;
- silc_atomic_add_int8(&stream->refcnt, 1);
+ silc_atomic_add_int32(&stream->refcnt, 1);
silc_packet_stream_destroy(stream);
}
@@ -1323,6 +1324,7 @@
{
SilcUInt32 len;
unsigned char tmp[32];
+ void *tmp_id;
if (!src_id && !dst_id)
return FALSE;
@@ -1332,16 +1334,17 @@
if (src_id) {
SILC_LOG_DEBUG(("Setting source ID to packet stream %p", stream));
- silc_free(stream->src_id);
if (!silc_id_id2str(src_id, src_id_type, tmp, sizeof(tmp), &len)) {
silc_mutex_unlock(stream->lock);
return FALSE;
}
- stream->src_id = silc_memdup(tmp, len);
- if (!stream->src_id) {
+ tmp_id = silc_memdup(tmp, len);
+ if (!tmp_id) {
silc_mutex_unlock(stream->lock);
return FALSE;
}
+ silc_free(stream->src_id);
+ stream->src_id = tmp_id;
stream->src_id_type = src_id_type;
stream->src_id_len = len;
}
@@ -1349,16 +1352,17 @@
if (dst_id) {
SILC_LOG_DEBUG(("Setting destination ID to packet stream %p", stream));
- silc_free(stream->dst_id);
if (!silc_id_id2str(dst_id, dst_id_type, tmp, sizeof(tmp), &len)) {
silc_mutex_unlock(stream->lock);
return FALSE;
}
- stream->dst_id = silc_memdup(tmp, len);
- if (!stream->dst_id) {
+ tmp_id = silc_memdup(tmp, len);
+ if (!tmp_id) {
silc_mutex_unlock(stream->lock);
return FALSE;
}
+ silc_free(stream->dst_id);
+ stream->dst_id = tmp_id;
stream->dst_id_type = dst_id_type;
stream->dst_id_len = len;
}
@@ -2340,7 +2344,7 @@
void *stream_context);
/* Packet waiting callbacks */
-static SilcPacketCallbacks silc_packet_wait_cbs =
+static const SilcPacketCallbacks silc_packet_wait_cbs =
{
silc_packet_wait_packet_receive, NULL, NULL
};
@@ -2529,7 +2533,7 @@
} *SilcPacketWrapperStream;
/* Packet wrapper callbacks */
-static SilcPacketCallbacks silc_packet_wrap_cbs =
+static const SilcPacketCallbacks silc_packet_wrap_cbs =
{
silc_packet_wrap_packet_receive, NULL, NULL
};
Modified: silc-server/branches/upstream/current/lib/silccore/silcpacket.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccore/silcpacket.h?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccore/silcpacket.h (original)
+++ silc-server/branches/upstream/current/lib/silccore/silcpacket.h Tue Oct 7 16:30:19 2008
@@ -361,7 +361,7 @@
***/
SilcPacketEngine
silc_packet_engine_start(SilcRng rng, SilcBool router,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context);
/****f* silccore/SilcPacketAPI/silc_packet_engine_stop
@@ -651,7 +651,7 @@
*
***/
SilcBool silc_packet_stream_link(SilcPacketStream stream,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context,
int priority, ...);
@@ -671,7 +671,7 @@
*
***/
void silc_packet_stream_unlink(SilcPacketStream stream,
- SilcPacketCallbacks *callbacks,
+ const SilcPacketCallbacks *callbacks,
void *callback_context);
/****f* silccore/SilcPacketAPI/SilcPacketWrapCoder
Modified: silc-server/branches/upstream/current/lib/silccrypt/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccrypt/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccrypt/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silccrypt/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silccrypt/Makefile.ad file in the source tree.
# Source: ./lib/silccrypt/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silccrypt/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silccrypt/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silccrypt/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silccrypt/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silccrypt/Makefile.ad file in the source tree.
# Source: ./lib/silccrypt/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silchttp/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silchttp/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silchttp/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silchttp/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silchttp/Makefile.ad file in the source tree.
# Source: ./lib/silchttp/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silchttp/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silchttp/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silchttp/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silchttp/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silchttp/Makefile.ad file in the source tree.
# Source: ./lib/silchttp/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:04 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcmath/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcmath/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcmath/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcmath/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcmath/Makefile.ad file in the source tree.
# Source: ./lib/silcmath/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcmath/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcmath/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcmath/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcmath/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcmath/Makefile.ad file in the source tree.
# Source: ./lib/silcmath/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcske/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcske/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcske/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcske/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcske/Makefile.ad file in the source tree.
# Source: ./lib/silcske/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcske/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcske/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcske/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcske/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcske/Makefile.ad file in the source tree.
# Source: ./lib/silcske/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcske/silcske.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcske/silcske.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcske/silcske.c (original)
+++ silc-server/branches/upstream/current/lib/silcske/silcske.c Tue Oct 7 16:30:19 2008
@@ -4,7 +4,7 @@
Author: Pekka Riikonen <priikone at silcnet.org>
- Copyright (C) 2000 - 2007 Pekka Riikonen
+ Copyright (C) 2000 - 2008 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2026,15 +2026,9 @@
silc_packet_free(ske->packet);
ske->packet = NULL;
- /* Verify the received public key and verify the signature if we are
- doing mutual authentication. */
- if (ske->start_payload &&
- ske->start_payload->flags & SILC_SKE_SP_FLAG_MUTUAL) {
-
- SILC_LOG_DEBUG(("We are doing mutual authentication"));
-
- if (!recv_payload->pk_data && (ske->callbacks->verify_key ||
- ske->repository)) {
+ /* Verify public key, except in rekey, when it is not sent */
+ if (!ske->rekey) {
+ if (!recv_payload->pk_data) {
/** Public key not provided */
SILC_LOG_ERROR(("Remote end did not send its public key (or "
"certificate), even though we require it"));
@@ -2044,8 +2038,7 @@
}
/* Decode the remote's public key */
- if (recv_payload->pk_data &&
- !silc_pkcs_public_key_alloc(recv_payload->pk_type,
+ if (!silc_pkcs_public_key_alloc(recv_payload->pk_type,
recv_payload->pk_data,
recv_payload->pk_len,
&ske->prop->public_key)) {
@@ -2056,39 +2049,36 @@
return SILC_FSM_CONTINUE;
}
- if (ske->prop->public_key && (ske->callbacks->verify_key ||
- ske->repository)) {
- SILC_LOG_DEBUG(("Verifying public key"));
-
- /** Waiting public key verification */
- silc_fsm_next(fsm, silc_ske_st_responder_phase4);
-
- /* If repository is provided, verify the key from there. */
- if (ske->repository) {
- SilcSKRFind find;
-
- find = silc_skr_find_alloc();
- if (!find) {
- ske->status = SILC_SKE_STATUS_OUT_OF_MEMORY;
- silc_fsm_next(fsm, silc_ske_st_responder_error);
- return SILC_FSM_CONTINUE;
- }
- silc_skr_find_set_pkcs_type(find,
- silc_pkcs_get_type(ske->prop->public_key));
- silc_skr_find_set_public_key(find, ske->prop->public_key);
- silc_skr_find_set_usage(find, SILC_SKR_USAGE_KEY_AGREEMENT);
-
- /* Find key from repository */
- SILC_FSM_CALL(silc_skr_find(ske->repository,
- silc_fsm_get_schedule(fsm), find,
- silc_ske_skr_callback, ske));
- } else {
- /* Verify from application */
+ SILC_LOG_DEBUG(("Verifying public key"));
+
+ /** Waiting public key verification */
+ silc_fsm_next(fsm, silc_ske_st_responder_phase4);
+
+ /* If repository is provided, verify the key from there. */
+ if (ske->repository) {
+ SilcSKRFind find;
+
+ find = silc_skr_find_alloc();
+ if (!find) {
+ ske->status = SILC_SKE_STATUS_OUT_OF_MEMORY;
+ silc_fsm_next(fsm, silc_ske_st_responder_error);
+ return SILC_FSM_CONTINUE;
+ }
+ silc_skr_find_set_pkcs_type(find,
+ silc_pkcs_get_type(ske->prop->public_key));
+ silc_skr_find_set_public_key(find, ske->prop->public_key);
+ silc_skr_find_set_usage(find, SILC_SKR_USAGE_KEY_AGREEMENT);
+
+ /* Find key from repository */
+ SILC_FSM_CALL(silc_skr_find(ske->repository,
+ silc_fsm_get_schedule(fsm), find,
+ silc_ske_skr_callback, ske));
+ } else {
+ /* Verify from application */
+ if (ske->callbacks->verify_key)
SILC_FSM_CALL(ske->callbacks->verify_key(ske, ske->prop->public_key,
ske->callbacks->context,
silc_ske_pk_verified, NULL));
- }
- /* NOT REACHED */
}
}
@@ -2129,7 +2119,7 @@
unsigned char hash[SILC_HASH_MAXLEN];
SilcUInt32 hash_len;
- SILC_LOG_DEBUG(("Public key is authentic"));
+ SILC_LOG_DEBUG(("We are doing mutual authentication"));
/* Compute the hash value */
status = silc_ske_make_hash(ske, hash, &hash_len, TRUE);
Modified: silc-server/branches/upstream/current/lib/silcskr/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcskr/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcskr/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcskr/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcskr/Makefile.ad file in the source tree.
# Source: ./lib/silcskr/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcskr/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcskr/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcskr/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcskr/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcskr/Makefile.ad file in the source tree.
# Source: ./lib/silcskr/Makefile.ad
-# Generated: Sun Jun 22 18:32:15 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcutil/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcutil/Makefile.am?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcutil/Makefile.am (original)
+++ silc-server/branches/upstream/current/lib/silcutil/Makefile.am Tue Oct 7 16:30:19 2008
@@ -2,7 +2,7 @@
# To make changes edit the ./lib/silcutil/Makefile.ad file in the source tree.
# Source: ./lib/silcutil/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcutil/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcutil/Makefile.in?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcutil/Makefile.in (original)
+++ silc-server/branches/upstream/current/lib/silcutil/Makefile.in Tue Oct 7 16:30:19 2008
@@ -18,7 +18,7 @@
# To make changes edit the ./lib/silcutil/Makefile.ad file in the source tree.
# Source: ./lib/silcutil/Makefile.ad
-# Generated: Sun Jun 22 18:32:16 EEST 2008 by priikone
+# Generated: Thu Sep 25 14:05:03 EEST 2008 by priikone
# Distribution: Server
# License:
Modified: silc-server/branches/upstream/current/lib/silcutil/silcstack.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcutil/silcstack.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcutil/silcstack.c (original)
+++ silc-server/branches/upstream/current/lib/silcutil/silcstack.c Tue Oct 7 16:30:19 2008
@@ -4,7 +4,7 @@
Author: Pekka Riikonen <priikone at silcnet.org>
- Copyright (C) 2003 - 2006 Pekka Riikonen
+ Copyright (C) 2003 - 2008 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -65,6 +65,9 @@
void silc_stack_free(SilcStack stack)
{
int i;
+
+ if (!stack)
+ return;
silc_free(stack->frames);
for (i = 0; i < SILC_STACK_BLOCK_NUM; i++)
Modified: silc-server/branches/upstream/current/lib/silcutil/silctypes.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcutil/silctypes.h?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcutil/silctypes.h (original)
+++ silc-server/branches/upstream/current/lib/silcutil/silctypes.h Tue Oct 7 16:30:19 2008
@@ -177,13 +177,13 @@
*
* SOURCE
*/
+#if SILC_SIZEOF_INT == 4
+typedef unsigned int SilcUInt32;
+typedef signed int SilcInt32;
+#else
#if SILC_SIZEOF_LONG == 4
typedef unsigned long SilcUInt32;
typedef signed long SilcInt32;
-#else
-#if SILC_SIZEOF_INT == 4
-typedef unsigned int SilcUInt32;
-typedef signed int SilcInt32;
#else
#if SILC_SIZEOF_LONG_LONG >= 4
#ifndef WIN32
@@ -634,4 +634,11 @@
#endif
/***/
+typedef char __check_size1[sizeof(SilcInt8) == 1 ? 1 : -1];
+typedef char __check_size2[sizeof(SilcUInt8) == 1 ? 1 : -1];
+typedef char __check_size3[sizeof(SilcInt16) == 2 ? 1 : -1];
+typedef char __check_size4[sizeof(SilcUInt16) == 2 ? 1 : -1];
+typedef char __check_size5[sizeof(SilcInt32) == 4 ? 1 : -1];
+typedef char __check_size6[sizeof(SilcUInt32) == 4 ? 1 : -1];
+
#endif /* SILCTYPES_H */
Modified: silc-server/branches/upstream/current/lib/silcutil/silcutil.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-server/branches/upstream/current/lib/silcutil/silcutil.c?rev=309&op=diff
==============================================================================
--- silc-server/branches/upstream/current/lib/silcutil/silcutil.c (original)
+++ silc-server/branches/upstream/current/lib/silcutil/silcutil.c Tue Oct 7 16:30:19 2008
@@ -557,13 +557,18 @@
printf("%s", prompt);
fflush(stdout);
+ read_again1:
if ((read(fd, input, sizeof(input))) < 0) {
+ if (errno == EAGAIN || errno == EINTR)
+ goto read_again1;
fprintf(stderr, "silc: %s\n", strerror(errno));
+ signal(SIGINT, SIG_DFL);
tcsetattr(fd, TCSANOW, &to_old);
return NULL;
}
if (strlen(input) <= 1) {
+ signal(SIGINT, SIG_DFL);
tcsetattr(fd, TCSANOW, &to_old);
return NULL;
}
@@ -591,10 +596,18 @@
printf("%s", prompt);
fflush(stdout);
+ signal(SIGINT, SIG_IGN);
+
+ read_again2:
if ((read(fd, input, sizeof(input))) < 0) {
+ if (errno == EAGAIN || errno == EINTR)
+ goto read_again2;
fprintf(stderr, "silc: %s\n", strerror(errno));
+ signal(SIGINT, SIG_DFL);
return NULL;
}
+
+ signal(SIGINT, SIG_DFL);
if (strlen(input) <= 1)
return NULL;
More information about the Pkg-silc-commits
mailing list