e922726a59
based on a diff from Zach Brown <zab at zabbo.net> sent to a vpnc-list
41 lines
1.7 KiB
Plaintext
41 lines
1.7 KiB
Plaintext
$OpenBSD: patch-isakmp-pkt_c,v 1.1 2005/03/08 06:38:08 sturm Exp $
|
|
--- isakmp-pkt.c.orig Sun Nov 21 23:15:41 2004
|
|
+++ isakmp-pkt.c Mon Mar 7 23:09:24 2005
|
|
@@ -293,14 +293,14 @@ struct isakmp_packet *new_isakmp_packet(
|
|
|
|
struct isakmp_payload *new_isakmp_payload(uint8_t type)
|
|
{
|
|
- struct isakmp_payload *result = xallocc(sizeof(struct isakmp_packet));
|
|
+ struct isakmp_payload *result = xallocc(sizeof(struct isakmp_payload));
|
|
result->type = type;
|
|
return result;
|
|
}
|
|
|
|
struct isakmp_payload *new_isakmp_data_payload(uint8_t type, const void *data, size_t data_length)
|
|
{
|
|
- struct isakmp_payload *result = xallocc(sizeof(struct isakmp_packet));
|
|
+ struct isakmp_payload *result = xallocc(sizeof(struct isakmp_payload));
|
|
|
|
if (type != ISAKMP_PAYLOAD_KE && type != ISAKMP_PAYLOAD_HASH
|
|
&& type != ISAKMP_PAYLOAD_SIG && type != ISAKMP_PAYLOAD_NONCE
|
|
@@ -697,7 +697,7 @@ struct isakmp_packet *parse_isakmp_packe
|
|
size_t isakmp_data_len;
|
|
|
|
if (data_len < ISAKMP_PAYLOAD_O) {
|
|
- DEBUG(2, printf("packet to short: len = %d < min = %d\n", data_len, ISAKMP_PAYLOAD_O));
|
|
+ DEBUG(2, printf("packet to short: len = %lu < min = %d\n", (unsigned long)data_len, ISAKMP_PAYLOAD_O));
|
|
reason = ISAKMP_N_UNEQUAL_PAYLOAD_LENGTHS;
|
|
goto error;
|
|
}
|
|
@@ -730,8 +730,8 @@ struct isakmp_packet *parse_isakmp_packe
|
|
isakmp_data_len = fetch4();
|
|
hex_dump("len", &isakmp_data_len, UINT32);
|
|
if (o_data_len != isakmp_data_len) {
|
|
- DEBUG(2, printf("isakmp length does not match packet length: isakmp = %d != datalen = %d\n",
|
|
- isakmp_data_len, o_data_len));
|
|
+ DEBUG(2, printf("isakmp length does not match packet length: isakmp = %lu != datalen = %lu\n",
|
|
+ (unsigned long)isakmp_data_len, (unsigned long)o_data_len));
|
|
reason = ISAKMP_N_UNEQUAL_PAYLOAD_LENGTHS;
|
|
goto error;
|
|
}
|