summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/sysdep/linux/klips.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd/sysdep/linux/klips.c')
-rw-r--r--sbin/isakmpd/sysdep/linux/klips.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/sbin/isakmpd/sysdep/linux/klips.c b/sbin/isakmpd/sysdep/linux/klips.c
index a1e76efda61..b307ff0c2ba 100644
--- a/sbin/isakmpd/sysdep/linux/klips.c
+++ b/sbin/isakmpd/sysdep/linux/klips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: klips.c,v 1.6 2001/06/27 03:31:44 angelos Exp $ */
+/* $OpenBSD: klips.c,v 1.7 2001/06/29 18:45:29 ho Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@@ -163,7 +163,6 @@ klips_group_spis (struct sa *sa, struct proto *proto1, struct proto *proto2,
{
struct encap_msghdr *emsg = 0;
struct sockaddr *dst;
- int dstlen;
emsg = calloc (1, EMT_GRPSPIS_FLEN + 2 * EMT_GRPSPIS_COMPLEN);
if (!emsg)
@@ -182,9 +181,9 @@ klips_group_spis (struct sa *sa, struct proto *proto1, struct proto *proto2,
memcpy (&emsg->em_rel[1].emr_spi, proto2->spi[incoming],
sizeof emsg->em_rel[1].emr_spi);
if (incoming)
- sa->transport->vtbl->get_src (sa->transport, &dst, &dstlen);
+ sa->transport->vtbl->get_src (sa->transport, &dst);
else
- sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen);
+ sa->transport->vtbl->get_dst (sa->transport, &dst);
emsg->em_rel[0].emr_dst
= emsg->em_rel[1].emr_dst = ((struct sockaddr_in *)dst)->sin_addr;
/* XXX What if IPCOMP etc. comes along? */
@@ -215,7 +214,7 @@ klips_set_spi (struct sa *sa, struct proto *proto, int incoming,
struct encap_msghdr *emsg = 0;
struct ipsec_proto *iproto = proto->data;
struct sockaddr *dst, *src;
- int dstlen, srclen, keylen, hashlen;
+ int keylen, hashlen;
size_t len;
struct ipe4_xdata *ip4x;
@@ -333,8 +332,8 @@ klips_set_spi (struct sa *sa, struct proto *proto, int incoming,
/*
* XXX Addresses has to be thought through. Assumes IPv4.
*/
- sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen);
- sa->transport->vtbl->get_src (sa->transport, &src, &srclen);
+ sa->transport->vtbl->get_dst (sa->transport, &dst);
+ sa->transport->vtbl->get_src (sa->transport, &src);
emsg->em_dst
= ((struct sockaddr_in *)(incoming ? src : dst))->sin_addr;
@@ -435,7 +434,6 @@ klips_delete_spi (struct sa *sa, struct proto *proto, int incoming)
{
struct encap_msghdr *emsg = 0;
struct sockaddr *dst;
- int dstlen;
struct ipsec_proto *iproto = proto->data;
emsg = calloc (1, EMT_SETSPI_FLEN);
@@ -447,9 +445,9 @@ klips_delete_spi (struct sa *sa, struct proto *proto, int incoming)
memcpy (&emsg->em_spi, proto->spi[incoming], sizeof emsg->em_spi);
if (incoming)
- sa->transport->vtbl->get_src (sa->transport, &dst, &dstlen);
+ sa->transport->vtbl->get_src (sa->transport, &dst);
else
- sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen);
+ sa->transport->vtbl->get_dst (sa->transport, &dst);
emsg->em_dst = ((struct sockaddr_in *)dst)->sin_addr;
/* XXX What if IPCOMP etc. comes along? */
emsg->em_proto
@@ -552,14 +550,13 @@ klips_enable_sa (struct sa *sa, struct sa *isakmp_sa)
{
struct ipsec_sa *isa = sa->data;
struct sockaddr *dst;
- int dstlen;
struct proto *proto = TAILQ_FIRST (&sa->protos);
struct ipsec_proto *iproto = proto->data;
struct encap_msghdr emsg;
int s = -1;
struct rtentry rt;
- sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen);
+ sa->transport->vtbl->get_dst (sa->transport, &dst);
/* XXX Is this needed? */
memset (&emsg, '\0', sizeof emsg);