diff options
-rw-r--r-- | sbin/isakmpd/ipsec.c | 5 | ||||
-rw-r--r-- | sbin/isakmpd/pf_encap.c | 25 | ||||
-rw-r--r-- | sbin/isakmpd/pf_encap.h | 6 | ||||
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/pf_key_v2.h | 6 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep.h | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/bsdi/sysdep.c | 8 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/freebsd/sysdep.c | 8 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/linux/klips.c | 6 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/linux/sysdep.c | 7 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/netbsd/sysdep.c | 8 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd-encap/sysdep.c | 8 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd/sysdep.c | 8 |
13 files changed, 44 insertions, 59 deletions
diff --git a/sbin/isakmpd/ipsec.c b/sbin/isakmpd/ipsec.c index 30682474948..0c81dc59958 100644 --- a/sbin/isakmpd/ipsec.c +++ b/sbin/isakmpd/ipsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec.c,v 1.49 2001/06/29 18:52:17 ho Exp $ */ +/* $OpenBSD: ipsec.c,v 1.50 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: ipsec.c,v 1.143 2000/12/11 23:57:42 niklas Exp $ */ /* @@ -1486,8 +1486,7 @@ ipsec_get_spi (size_t *sz, u_int8_t proto, struct message *msg) transport->vtbl->get_src (transport, &dst); /* The peer is the source. */ transport->vtbl->get_dst (transport, &src); - return sysdep_ipsec_get_spi (sz, proto, src, src->sa_len, dst, - dst->sa_len, msg->exchange->seq); + return sysdep_ipsec_get_spi (sz, proto, src, dst, msg->exchange->seq); } } diff --git a/sbin/isakmpd/pf_encap.c b/sbin/isakmpd/pf_encap.c index f905180d320..1ac22f8b875 100644 --- a/sbin/isakmpd/pf_encap.c +++ b/sbin/isakmpd/pf_encap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_encap.c,v 1.23 2001/06/29 04:12:00 ho Exp $ */ +/* $OpenBSD: pf_encap.c,v 1.24 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: pf_encap.c,v 1.73 2000/12/04 04:46:34 angelos Exp $ */ /* @@ -391,8 +391,8 @@ pf_encap_read () * SRC, SRCLEN, DST & DSTLEN. Stash the SPI size in SZ. */ u_int8_t * -pf_encap_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, int srclen, - struct sockaddr *dst, int dstlen) +pf_encap_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, + struct sockaddr *dst) { struct encap_msghdr *emsg = 0; u_int8_t *spi = 0; @@ -442,7 +442,6 @@ pf_encap_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); if (!emsg) @@ -455,9 +454,9 @@ pf_encap_group_spis (struct sa *sa, struct proto *proto1, struct proto *proto2, memcpy (&emsg->em_rel_spi2, proto2->spi[incoming], sizeof emsg->em_rel_spi2); 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_dst = emsg->em_rel_dst2 = ((struct sockaddr_in *)dst)->sin_addr; /* XXX What if IPCOMP etc. comes along? */ emsg->em_rel_sproto @@ -490,7 +489,7 @@ pf_encap_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 esp_new_xencap *edx; struct ah_new_xencap *amx; @@ -614,8 +613,8 @@ pf_encap_set_spi (struct sa *sa, struct proto *proto, int incoming) /* Fill in a well-defined value in this reserved field. */ emsg->em_satype = 0; - 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; emsg->em_src @@ -674,7 +673,6 @@ pf_encap_delete_spi (struct sa *sa, struct proto *proto, int incoming) { struct encap_msghdr *emsg = 0; struct sockaddr *dst; - int dstlen; emsg = calloc (1, EMT_DELSPI_FLEN); if (!emsg) @@ -685,9 +683,9 @@ pf_encap_delete_spi (struct sa *sa, struct proto *proto, int incoming) memcpy (&emsg->em_gen_spi, proto->spi[incoming], sizeof emsg->em_gen_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_gen_dst = ((struct sockaddr_in *)dst)->sin_addr; /* XXX What if IPCOMP etc. comes along? */ emsg->em_gen_sproto @@ -713,10 +711,9 @@ pf_encap_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); - sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen); + sa->transport->vtbl->get_dst (sa->transport, &dst); return pf_encap_enable_spi (isa->src_net, isa->src_mask, isa->dst_net, isa->dst_mask, proto->spi[0], proto->proto, diff --git a/sbin/isakmpd/pf_encap.h b/sbin/isakmpd/pf_encap.h index 167d912b098..26ae93e1466 100644 --- a/sbin/isakmpd/pf_encap.h +++ b/sbin/isakmpd/pf_encap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_encap.h,v 1.8 2000/12/12 01:46:17 niklas Exp $ */ +/* $OpenBSD: pf_encap.h,v 1.9 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: pf_encap.h,v 1.13 2000/12/04 04:46:35 angelos Exp $ */ /* @@ -61,8 +61,8 @@ extern int pf_encap_delete_spi (struct sa *, struct proto *, int); extern int pf_encap_enable_sa (struct sa *, struct sa *); extern int pf_encap_enable_spi (in_addr_t, in_addr_t, in_addr_t, in_addr_t, u_int8_t *, u_int8_t, in_addr_t); -extern u_int8_t *pf_encap_get_spi (size_t *, u_int8_t, struct sockaddr *, int, - struct sockaddr *, int); +extern u_int8_t *pf_encap_get_spi (size_t *, u_int8_t, struct sockaddr *, + struct sockaddr *); extern int pf_encap_group_spis (struct sa *, struct proto *, struct proto *, int); extern void pf_encap_handler (int); diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index 6ee51fd2043..de06d708f24 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.71 2001/06/29 18:52:17 ho Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.72 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -605,7 +605,7 @@ pf_key_v2_open () */ u_int8_t * pf_key_v2_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { struct sadb_msg msg; struct sadb_sa *sa; diff --git a/sbin/isakmpd/pf_key_v2.h b/sbin/isakmpd/pf_key_v2.h index 1ee4050ab74..8b1949532ce 100644 --- a/sbin/isakmpd/pf_key_v2.h +++ b/sbin/isakmpd/pf_key_v2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.h,v 1.6 2001/05/05 00:50:31 angelos Exp $ */ +/* $OpenBSD: pf_key_v2.h,v 1.7 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: pf_key_v2.h,v 1.4 2000/12/04 04:46:35 angelos Exp $ */ /* @@ -49,8 +49,8 @@ extern int pf_key_v2_delete_spi (struct sa *, struct proto *, int); extern int pf_key_v2_enable_sa (struct sa *, struct sa *); extern int pf_key_v2_enable_spi (in_addr_t, in_addr_t, in_addr_t, in_addr_t, u_int8_t *, u_int8_t, in_addr_t); -extern u_int8_t *pf_key_v2_get_spi (size_t *, u_int8_t, struct sockaddr *, int, - struct sockaddr *, int, u_int32_t); +extern u_int8_t *pf_key_v2_get_spi (size_t *, u_int8_t, struct sockaddr *, + struct sockaddr *, u_int32_t); extern int pf_key_v2_group_spis (struct sa *, struct proto *, struct proto *, int); extern void pf_key_v2_handler (int); diff --git a/sbin/isakmpd/sysdep.h b/sbin/isakmpd/sysdep.h index 54ac3cadbb2..34eee8d4a36 100644 --- a/sbin/isakmpd/sysdep.h +++ b/sbin/isakmpd/sysdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.h,v 1.10 2001/05/05 00:50:56 angelos Exp $ */ +/* $OpenBSD: sysdep.h,v 1.11 2001/06/29 19:08:11 ho Exp $ */ /* $EOM: sysdep.h,v 1.17 2000/12/04 04:46:35 angelos Exp $ */ /* @@ -52,7 +52,7 @@ extern void sysdep_connection_check (char *); extern int sysdep_ipsec_delete_spi (struct sa *, struct proto *, int); extern int sysdep_ipsec_enable_sa (struct sa *, struct sa *); extern u_int8_t *sysdep_ipsec_get_spi (size_t *, u_int8_t, struct sockaddr *, - int, struct sockaddr *, int, u_int32_t); + struct sockaddr *, u_int32_t); extern int sysdep_ipsec_group_spis (struct sa *, struct proto *, struct proto *, int); extern int sysdep_ipsec_set_spi (struct sa *, struct proto *, int, diff --git a/sbin/isakmpd/sysdep/bsdi/sysdep.c b/sbin/isakmpd/sysdep/bsdi/sysdep.c index 50d926ce9ef..b5535b84f38 100644 --- a/sbin/isakmpd/sysdep/bsdi/sysdep.c +++ b/sbin/isakmpd/sysdep/bsdi/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.3 2001/06/29 18:45:27 ho Exp $ */ +/* $OpenBSD: sysdep.c,v 1.4 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -109,8 +109,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -118,8 +117,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, /* XXX should be random instead I think. */ return strdup ("\x12\x34\x56\x78"); } - return KEY_API (get_spi) (sz, proto, src, src->sa_len, dst, dst->sa_len, - seq); + return KEY_API (get_spi) (sz, proto, src, dst, seq); } /* Force communication on socket FD to go in the clear. */ diff --git a/sbin/isakmpd/sysdep/freebsd/sysdep.c b/sbin/isakmpd/sysdep/freebsd/sysdep.c index fd399485c74..17c9beea6c9 100644 --- a/sbin/isakmpd/sysdep/freebsd/sysdep.c +++ b/sbin/isakmpd/sysdep/freebsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.5 2001/06/29 18:45:28 ho Exp $ */ +/* $OpenBSD: sysdep.c,v 1.6 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -115,8 +115,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -124,8 +123,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, /* XXX should be random instead I think. */ return strdup ("\x12\x34\x56\x78"); } - return KEY_API (get_spi) (sz, proto, src, src->sa_len, dst, dst->sa_len, - seq); + return KEY_API (get_spi) (sz, proto, src, dst, seq); } /* Force communication on socket FD to go in the clear. */ diff --git a/sbin/isakmpd/sysdep/linux/klips.c b/sbin/isakmpd/sysdep/linux/klips.c index b307ff0c2ba..da614330e05 100644 --- a/sbin/isakmpd/sysdep/linux/klips.c +++ b/sbin/isakmpd/sysdep/linux/klips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: klips.c,v 1.7 2001/06/29 18:45:29 ho Exp $ */ +/* $OpenBSD: klips.c,v 1.8 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -135,8 +135,8 @@ klips_write (struct encap_msghdr *em) * SRC, SRCLEN, DST & DSTLEN. Stash the SPI size in SZ. */ u_int8_t * -klips_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, int srclen, - struct sockaddr *dst, int dstlen, u_int32_t seq) +klips_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, + struct sockaddr *dst, u_int32_t seq) { u_int8_t *spi; u_int32_t spinum; diff --git a/sbin/isakmpd/sysdep/linux/sysdep.c b/sbin/isakmpd/sysdep/linux/sysdep.c index abeb44b7c8a..242788e04fa 100644 --- a/sbin/isakmpd/sysdep/linux/sysdep.c +++ b/sbin/isakmpd/sysdep/linux/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.6 2001/05/05 00:51:48 angelos Exp $ */ +/* $OpenBSD: sysdep.c,v 1.7 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -120,8 +120,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -130,7 +129,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, return strdup ("\x12\x34\x56\x78"); } - return klips_get_spi (sz, proto, src, srclen, dst, dstlen, seq); + return klips_get_spi (sz, proto, src, dst, seq); } int diff --git a/sbin/isakmpd/sysdep/netbsd/sysdep.c b/sbin/isakmpd/sysdep/netbsd/sysdep.c index 0c97976695c..8ac058ffc5a 100644 --- a/sbin/isakmpd/sysdep/netbsd/sysdep.c +++ b/sbin/isakmpd/sysdep/netbsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.5 2001/06/29 18:45:28 ho Exp $ */ +/* $OpenBSD: sysdep.c,v 1.6 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -109,8 +109,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -118,8 +117,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, /* XXX should be random instead I think. */ return strdup ("\x12\x34\x56\x78"); } - return KEY_API (get_spi) (sz, proto, src, src->sa_len, dst, dst->sa_len, - seq); + return KEY_API (get_spi) (sz, proto, src, dst, seq); } /* Force communication on socket FD to go in the clear. */ diff --git a/sbin/isakmpd/sysdep/openbsd-encap/sysdep.c b/sbin/isakmpd/sysdep/openbsd-encap/sysdep.c index b4b823cc4a3..15248097023 100644 --- a/sbin/isakmpd/sysdep/openbsd-encap/sysdep.c +++ b/sbin/isakmpd/sysdep/openbsd-encap/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.5 2001/06/29 18:45:27 ho Exp $ */ +/* $OpenBSD: sysdep.c,v 1.6 2001/06/29 19:08:12 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -118,8 +118,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -127,8 +126,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, /* XXX should be random instead I think. */ return strdup ("\x12\x34\x56\x78"); } - return KEY_API (get_spi) (sz, proto, src, src->sa_len, dst, dst->sa_len, - seq); + return KEY_API (get_spi) (sz, proto, src, dst, seq); } /* Force communication on socket FD to go in the clear. */ diff --git a/sbin/isakmpd/sysdep/openbsd/sysdep.c b/sbin/isakmpd/sysdep/openbsd/sysdep.c index bfc3890389a..345f0580301 100644 --- a/sbin/isakmpd/sysdep/openbsd/sysdep.c +++ b/sbin/isakmpd/sysdep/openbsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.10 2001/06/29 18:45:27 ho Exp $ */ +/* $OpenBSD: sysdep.c,v 1.11 2001/06/29 19:08:12 ho Exp $ */ /* $EOM: sysdep.c,v 1.9 2000/12/04 04:46:35 angelos Exp $ */ /* @@ -119,8 +119,7 @@ sysdep_connection_check (char *name) */ u_int8_t * sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, - int srclen, struct sockaddr *dst, int dstlen, - u_int32_t seq) + struct sockaddr *dst, u_int32_t seq) { if (app_none) { @@ -128,8 +127,7 @@ sysdep_ipsec_get_spi (size_t *sz, u_int8_t proto, struct sockaddr *src, /* XXX should be random instead I think. */ return strdup ("\x12\x34\x56\x78"); } - return KEY_API (get_spi) (sz, proto, src, src->sa_len, dst, dst->sa_len, - seq); + return KEY_API (get_spi) (sz, proto, src, dst, seq); } /* Force communication on socket FD to go in the clear. */ |