Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make it compilable on OpenBSD with MIP6 (CN) configuration.

  • Loading branch information...
commit 180020615a8332891c8757695c57c05938bb8dd7 1 parent 4d1caf5
t-momose authored
View
243 kame/sys/netinet6/mip6_cncore.c
@@ -1,4 +1,4 @@
-/* $KAME: mip6_cncore.c,v 1.43 2003/10/21 10:53:33 keiichi Exp $ */
+/* $KAME: mip6_cncore.c,v 1.44 2003/10/31 12:19:41 t-momose Exp $ */
/*
* Copyright (C) 2003 WIDE Project. All rights reserved.
@@ -104,13 +104,24 @@
#include <netkey/keydb.h>
#endif /* IPSEC && !__OpenBSD__ */
+#ifdef __OpenBSD__
+#include <netinet/ip_ipsp.h>
+#endif
+
#ifdef HAVE_SHA1
#include <sys/sha1.h>
#define SHA1_RESULTLEN 20
#else
#include <crypto/sha1.h>
+#ifdef __OpenBSD__
+#define SHA1_RESULTLEN 20
+#endif
#endif
+#ifdef __OpenBSD__
+#include <crypto/cryptodev.h>
+#else
#include <crypto/hmac.h>
+#endif
#include <net/if_hif.h>
@@ -124,6 +135,10 @@
#include <netinet6/mip6_mncore.h>
#endif /* MIP6_MOBILE_NODE */
+#ifdef __OpenBSD__
+#undef IPSEC
+#endif
+
struct mip6_bc_list mip6_bc_list;
#ifdef __NetBSD__
struct callout mip6_bc_ch = CALLOUT_INITIALIZER;
@@ -192,7 +207,7 @@ static void mip6_bc_timeout(void *);
/* return routability processing. */
static void mip6_create_nonce(mip6_nonce_t *);
static void mip6_create_nodekey(mip6_nodekey_t *);
-static void mip6_update_nonce_nodekey(void *);
+/*static void mip6_update_nonce_nodekey(void *);*/
/* Mobility Header processing. */
static int mip6_ip6mh_create(struct ip6_mobility **, struct sockaddr_in6 *,
@@ -1305,6 +1320,7 @@ mip6_create_nodekey(nodekey)
((u_long *)nodekey)[i] = random();
}
+#if 0
/* This function should be called periodically */
static void
mip6_update_nonce_nodekey(ignored_arg)
@@ -1336,6 +1352,7 @@ mip6_update_nonce_nodekey(ignored_arg)
splx(s);
}
+#endif
int
mip6_get_nonce(index, nonce)
@@ -1391,7 +1408,8 @@ mip6_get_nodekey(index, nodekey)
}
/* Generate keygen */
-void
+#ifndef __OpenBSD__
+int
mip6_create_keygen_token(addr, nodekey, nonce, hc, token)
struct in6_addr *addr;
mip6_nodekey_t *nodekey;
@@ -1411,8 +1429,81 @@ mip6_create_keygen_token(addr, nodekey, nonce, hc, token)
hmac_result(&hmac_ctx, result, sizeof(result));
/* First64 */
bcopy(result, token, 8);
+
+ return (0);
+}
+#else /* OpenBSD */
+int
+mip6_create_keygen_token(addr, nodekey, nonce, hc, token)
+ struct in6_addr *addr;
+ mip6_nodekey_t *nodekey;
+ mip6_nonce_t *nonce;
+ u_int8_t hc;
+ void *token; /* 64 bit */
+{
+ struct cryptoini cria;
+ struct cryptop *crp;
+ u_int64_t sid = 0;
+ int error = 0;
+ static int mip6_create_keygen_token_cb(void *);
+
+ bzero(&cria, sizeof(cria));
+ cria.cri_alg = CRYPTO_SHA1_HMAC;
+ cria.cri_klen = sizeof(mip6_nodekey_t) * 8; /* bit */
+ cria.cri_key = (caddr_t)nodekey;
+
+ if ((error = crypto_newsession(&sid, &cria, 0))) {
+ return (error);
+ }
+
+ if ((crp = malloc(sizeof(struct cryptop), M_TEMP, M_WAITOK)) == NULL) {
+ error = ENOMEM;
+ goto done;
+ }
+ bzero(crp, sizeof(crp));
+ crp->crp_ilen = sizeof(*addr) + sizeof(*nonce) + sizeof(hc);
+ crp->crp_olen = HMACSIZE;
+ crp->crp_flags = 0;
+ if ((crp->crp_buf = malloc(crp->crp_ilen, M_TEMP, M_WAITOK)) == NULL) {
+ free(crp, M_TEMP);
+ error = ENOMEM;
+ goto done;
+ }
+ bzero(crp->crp_buf, crp->crp_ilen);
+ bcopy(addr, crp->crp_buf, sizeof(*addr));
+ bcopy(nonce, crp->crp_buf + sizeof(*addr), sizeof(*nonce));
+ bcopy(&hc, crp->crp_buf + sizeof(*addr) + sizeof(*nonce), sizeof(hc));
+ crp->crp_callback = (int (*) (struct cryptop *)) mip6_create_keygen_token_cb;
+ crp->crp_sid = sid;
+ crp->crp_opaque = NULL;
+ crypto_dispatch(crp);
+
+ if (tsleep(crp, PSOCK, "mip6keygen", 0)) {
+ free(crp->crp_buf, M_TEMP);
+ free(crp, M_TEMP);
+ error = EINVAL;
+ }
+
+ /* First64 */
+ bcopy(crp->crp_buf, token, 8);
+
+done:
+
+ crypto_freesession(sid);
+ return (error);
}
+static int
+mip6_create_keygen_token_cb(void *op)
+{
+ struct cryptop *crp;
+
+ crp = (struct cryptop *)op;
+ wakeup(crp);
+ return (0);
+}
+#endif
+
/*
* Check a Binding Update packet whether it is valid
*/
@@ -1447,12 +1538,14 @@ mip6_is_valid_bu(ip6, ip6mu, ip6mulen, mopt, hoa_sa, coa_sa, cache_req, status)
cksum_backup = ip6mu->ip6mu_cksum;
ip6mu->ip6mu_cksum = 0;
/* Calculate authenticator */
- mip6_calculate_authenticator(key_bm, authdata,
+ if (mip6_calculate_authenticator(key_bm, authdata,
&coa_sa->sin6_addr, &ip6->ip6_dst,
(caddr_t)ip6mu, ip6mulen,
(u_int8_t *)mopt->mopt_auth + sizeof(struct ip6m_opt_authdata)
- (u_int8_t *)ip6mu,
- MOPT_AUTH_LEN(mopt) + 2);
+ MOPT_AUTH_LEN(mopt) + 2)) {
+ return (EINVAL);
+ }
ip6mu->ip6mu_cksum = cksum_backup;
@@ -1510,16 +1603,26 @@ mip6_hexdump("CN: Careof Nodekey: ", sizeof(coa_nodekey), &coa_nodekey);
#endif
/* Calculate home keygen token */
- mip6_create_keygen_token(&hoa_sa->sin6_addr,
- &home_nodekey, &home_nonce, 0, &home_token);
+ if (mip6_create_keygen_token(&hoa_sa->sin6_addr,
+ &home_nodekey, &home_nonce, 0, &home_token)) {
+ mip6log((LOG_ERR,
+ "%s:%d: Failed of creation of home keygen token\n",
+ __FILE__, __LINE__));
+ return (IP6MA_STATUS_UNSPECIFIED);
+ }
#ifdef RR_DBG
mip6_hexdump("CN: Home keygen token: ", sizeof(home_token), (u_int8_t *)&home_token);
#endif
if (!ignore_co_nonce) {
/* Calculate care-of keygen token */
- mip6_create_keygen_token(&coa_sa->sin6_addr,
- &coa_nodekey, &careof_nonce, 1, &careof_token);
+ if (mip6_create_keygen_token(&coa_sa->sin6_addr,
+ &coa_nodekey, &careof_nonce, 1, &careof_token)) {
+ mip6log((LOG_ERR,
+ "%s:%d: Failed of creation of care-of keygen token\n",
+ __FILE__, __LINE__));
+ return (IP6MA_STATUS_UNSPECIFIED);
+ }
#ifdef RR_DBG
mip6_hexdump("CN: Care-of keygen token: ", sizeof(careof_token), (u_int8_t *)&careof_token);
#endif
@@ -1562,7 +1665,8 @@ mip6_calculate_kbm(home_token, careof_token, key_bm)
* - - - - - - - ->
* exclude_offset
*/
-void
+#ifndef __OpenBSD__
+int
mip6_calculate_authenticator(key_bm, result, addr1, addr2, data, datalen,
exclude_offset, exclude_data_len)
u_int8_t *key_bm; /* Kbm */
@@ -1611,7 +1715,92 @@ mip6_calculate_authenticator(key_bm, result, addr1, addr2, data, datalen,
#ifdef RR_DBG
mip6_hexdump("MN: Authdata: ", MIP6_AUTHENTICATOR_LEN, result);
#endif
+
+ retrun (0);
}
+#else /* !__OpenBSD __*/
+int
+mip6_calculate_authenticator(key_bm, result, addr1, addr2, data, datalen,
+ exclude_offset, exclude_data_len)
+ u_int8_t *key_bm; /* Kbm */
+ u_int8_t *result;
+ struct in6_addr *addr1, *addr2;
+ caddr_t data;
+ size_t datalen;
+ int exclude_offset;
+ size_t exclude_data_len;
+{
+ struct cryptoini cria;
+ struct cryptop *crp;
+ u_int64_t sid = 0;
+ int error = 0;
+ int restlen;
+ caddr_t p;
+ static int mip6_calculate_authenticator_cb(void *);
+
+ bzero(&cria, sizeof(cria));
+ cria.cri_alg = CRYPTO_SHA1_HMAC;
+ cria.cri_klen = MIP6_KBM_LEN * 8; /* bit */
+ cria.cri_key = key_bm;
+
+ if ((error = crypto_newsession(&sid, &cria, 0))) {
+ return (error);
+ }
+
+ if ((crp = malloc(sizeof(struct cryptop), M_TEMP, M_WAITOK)) == NULL) {
+ error = ENOMEM;
+ goto done;
+ }
+ restlen = datalen - (exclude_offset + exclude_data_len);
+ bzero(crp, sizeof(crp));
+ crp->crp_ilen = sizeof(*addr1) + sizeof(*addr2) + exclude_offset + restlen;
+ crp->crp_olen = HMACSIZE;
+ crp->crp_flags = 0;
+ if ((crp->crp_buf = malloc(crp->crp_ilen, M_TEMP, M_WAITOK)) == NULL) {
+ free(crp, M_TEMP);
+ error = ENOMEM;
+ goto done;
+ }
+ bzero(crp->crp_buf, crp->crp_ilen);
+
+ p = crp->crp_buf;
+ bcopy(addr1, p, sizeof(*addr1)); p += sizeof(*addr1);
+ bcopy(addr2, p, sizeof(*addr2)); p += sizeof(*addr2);
+ bcopy(data, p, exclude_offset); p += exclude_offset;
+ /* Exclude authdata field in the mobility option to calculate authdata
+ But it should be included padding area */
+ if (restlen > 0) {
+ bcopy(data + exclude_offset + exclude_data_len, p, restlen); p += restlen;
+ }
+ crp->crp_callback = (int (*) (struct cryptop *)) mip6_calculate_authenticator_cb;
+ crp->crp_sid = sid;
+ crp->crp_opaque = NULL;
+ crypto_dispatch(crp);
+
+ if (tsleep(crp, PSOCK, "mip6keygen", 0)) {
+ /* Never happen ... */
+ free(crp->crp_buf, M_TEMP);
+ free(crp, M_TEMP);
+ error = EINVAL;
+ }
+ /* First(96, sha1_result) */
+ bcopy(crp->crp_buf, result, MIP6_AUTHENTICATOR_LEN);
+
+done:
+ crypto_freesession(sid);
+ return (error);
+}
+
+static int
+mip6_calculate_authenticator_cb(void *op)
+{
+ struct cryptop *crp;
+
+ crp = (struct cryptop *)op;
+ wakeup(crp);
+ return (0);
+}
+#endif /* !__OpenBSD__ */
int
mip6_ip6mhi_input(m0, ip6mhi, ip6mhilen)
@@ -1870,10 +2059,17 @@ mip6_ip6mu_input(m, ip6mu, ip6mulen)
bi.mbc_flags = ip6mu->ip6mu_flags;
+#ifdef M_DECRYPTED /* not openbsd */
if (((m->m_flags & M_DECRYPTED) != 0)
|| ((m->m_flags & M_AUTHIPHDR) != 0)) {
isprotected = 1;
}
+#endif
+#ifdef __OpenBSD__
+ if ((m->m_flags & M_AUTH) != 0) {
+ isprotected = 1;
+ }
+#endif
bi.mbc_pcoa = src_sa;
n = ip6_findaux(m);
@@ -2147,8 +2343,13 @@ mip6_ip6mh_create(pktopt_mobility, src, dst, cookie)
ip6mh->ip6mh_type = IP6M_HOME_TEST;
ip6mh->ip6mh_nonce_index = htons(nonce_index);
bcopy(cookie, ip6mh->ip6mh_cookie, sizeof(ip6mh->ip6mh_cookie));
- mip6_create_keygen_token(&dst->sin6_addr,
- &home_nodekey, &home_nonce, 0, ip6mh->ip6mh_token);
+ if (mip6_create_keygen_token(&dst->sin6_addr,
+ &home_nodekey, &home_nonce, 0, ip6mh->ip6mh_token)) {
+ mip6log((LOG_ERR,
+ "%s:%d: Failed of creation of home keygen token\n",
+ __FILE__, __LINE__));
+ return (EINVAL);
+ }
/* calculate checksum. */
ip6mh->ip6mh_cksum = mip6_cksum(src, dst,
@@ -2189,9 +2390,14 @@ mip6_ip6mc_create(pktopt_mobility, src, dst, cookie)
ip6mc->ip6mc_type = IP6M_CAREOF_TEST;
ip6mc->ip6mc_nonce_index = htons(nonce_index);
bcopy(cookie, ip6mc->ip6mc_cookie, sizeof(ip6mc->ip6mc_cookie));
- mip6_create_keygen_token(&dst->sin6_addr,
+ if (mip6_create_keygen_token(&dst->sin6_addr,
&careof_nodekey, &careof_nonce, 1,
- ip6mc->ip6mc_token);
+ ip6mc->ip6mc_token)) {
+ mip6log((LOG_ERR,
+ "%s:%d: Failed of creation of home keygen token\n",
+ __FILE__, __LINE__));
+ return (EINVAL);
+ }
/* calculate checksum. */
ip6mc->ip6mc_cksum = mip6_cksum(src, dst,
@@ -2743,9 +2949,7 @@ mip6_tunnel_control(action, entry, func, ep)
return (0);
}
-#if !defined(MIP6_NOHAIPSEC)
-#ifdef IPSEC
-#ifndef __OpenBSD__
+#if !defined(MIP6_NOHAIPSEC) && (defined(IPSEC) || defined(__OpenBSD__))
static int
mip6_update_ipsecdb(haddr, ocoa, ncoa, haaddr)
struct sockaddr_in6 *haddr;
@@ -2771,13 +2975,8 @@ mip6_update_ipsecdb(haddr, ocoa, ncoa, haaddr)
if (MIP6_IS_MN) {
key_mip6_update_mobile_node_ipsecdb(haddr, ocoa, ncoa, haaddr);
}
-
return (0);
}
-#else
-/* __OpenBSD__ part. not yet. */
-#endif
-#endif /* IPSEC */
#endif /* !MIP6_NOHAIPSEC */
#endif /* MIP6_HOME_AGENT || MIP6_MOBILE_NODE */
View
6 kame/sys/netinet6/mip6_cncore.h
@@ -1,4 +1,4 @@
-/* $KAME: mip6_cncore.h,v 1.9 2003/10/21 03:03:10 keiichi Exp $ */
+/* $KAME: mip6_cncore.h,v 1.10 2003/10/31 12:19:41 t-momose Exp $ */
/*
* Copyright (C) 2003 WIDE Project. All rights reserved.
@@ -89,7 +89,7 @@ int mip6_bc_send_ba(struct sockaddr_in6 *, struct sockaddr_in6 *,
/* return routablity processing. */
int mip6_get_nonce(u_int16_t, mip6_nonce_t *);
int mip6_get_nodekey(u_int16_t, mip6_nodekey_t *);
-void mip6_create_keygen_token(struct in6_addr *, mip6_nodekey_t *,
+int mip6_create_keygen_token(struct in6_addr *, mip6_nodekey_t *,
mip6_nonce_t *, u_int8_t, void *);
int mip6_is_valid_bu(struct ip6_hdr *, struct ip6m_binding_update *,
int, struct mip6_mobility_options *, struct sockaddr_in6 *,
@@ -98,7 +98,7 @@ int mip6_calculate_kbm_from_index(struct sockaddr_in6 *, struct sockaddr_in6 *,
u_int16_t, u_int16_t, int, u_int8_t *);
void mip6_calculate_kbm(mip6_home_token_t *, mip6_careof_token_t *,
u_int8_t *);
-void mip6_calculate_authenticator(u_int8_t *, u_int8_t *, struct in6_addr *,
+int mip6_calculate_authenticator(u_int8_t *, u_int8_t *, struct in6_addr *,
struct in6_addr *, caddr_t, size_t, int, size_t);
/* Mobility Header processing. */
View
43 kame/sys/netinet6/mip6_mncore.c
@@ -1,4 +1,4 @@
-/* $KAME: mip6_mncore.c,v 1.39 2003/10/22 02:12:54 keiichi Exp $ */
+/* $KAME: mip6_mncore.c,v 1.40 2003/10/31 12:19:41 t-momose Exp $ */
/*
* Copyright (C) 2003 WIDE Project. All rights reserved.
@@ -58,6 +58,10 @@
#include <sys/proc.h>
#include <sys/syslog.h>
+#ifdef __OpenBSD__
+#include <dev/rndvar.h>
+#endif
+
#include <net/if.h>
#include <net/if_types.h>
#include <net/route.h>
@@ -91,6 +95,12 @@ struct mip6_preferred_ifnames mip6_preferred_ifnames;
struct callout mip6_bu_ch = CALLOUT_INITIALIZER;
#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3)
struct callout mip6_bu_ch;
+#elif defined(__OpenBSD__)
+struct timeout mip6_bu_ch;
+#endif
+
+#ifdef __OpenBSD__
+#undef IPSEC
#endif
static const struct sockaddr_in6 sin6_any = {
@@ -3003,10 +3013,17 @@ mip6_ip6ma_input(m, ip6ma, ip6malen)
return (EINVAL);
}
+#ifdef M_DECRYPTED /* not openbsd */
if (((m->m_flags & M_DECRYPTED) != 0)
|| ((m->m_flags & M_AUTHIPHDR) != 0)) {
ba_safe = 1;
}
+#endif
+#ifdef __OpenBSD__
+ if ((m->m_flags & M_AUTH) != 0) {
+ ba_safe = 1;
+ }
+#endif
if ((error = mip6_get_mobility_options((struct ip6_mobility *)ip6ma,
sizeof(*ip6ma),
@@ -3075,16 +3092,17 @@ mip6_ip6ma_input(m, ip6ma, ip6malen)
ignore_co_nonce ? NULL : &mbu->mbu_careof_token,
key_bm);
/* Calculate Authenticator */
- mip6_calculate_authenticator(key_bm, authdata,
+ if (mip6_calculate_authenticator(key_bm, authdata,
&mbu->mbu_coa.sin6_addr, &ip6->ip6_dst,
(caddr_t)ip6ma, ip6malen,
(caddr_t)mopt.mopt_auth + 2 - (caddr_t)ip6ma,
- min(MOPT_AUTH_LEN(&mopt) + 2, MIP6_AUTHENTICATOR_LEN));
- ip6ma->ip6ma_cksum = cksum_backup;
- if (bcmp(authdata, mopt.mopt_auth + 2,
- min(MOPT_AUTH_LEN(&mopt) + 2, MIP6_AUTHENTICATOR_LEN))
- == 0)
- goto accept_binding_ack;
+ min(MOPT_AUTH_LEN(&mopt) + 2, MIP6_AUTHENTICATOR_LEN)) == 0) {
+ ip6ma->ip6ma_cksum = cksum_backup;
+ if (bcmp(authdata, mopt.mopt_auth + 2,
+ min(MOPT_AUTH_LEN(&mopt) + 2, MIP6_AUTHENTICATOR_LEN))
+ == 0)
+ goto accept_binding_ack;
+ }
}
if (!mip6ctl_use_ipsec && (mbu->mbu_flags & IP6MU_HOME)) {
@@ -3858,11 +3876,16 @@ mip6_hexdump("MN: Kbm: ", sizeof(key_bm), key_bm);
/* Calculate authenticator (5.2.6) */
/* First(96, HMAC_SHA1(Kbm, (coa, | cn | BU))) */
- mip6_calculate_authenticator(key_bm, (u_int8_t *)(mopt_auth + 1),
+ if (mip6_calculate_authenticator(key_bm, (u_int8_t *)(mopt_auth + 1),
&mbu->mbu_coa.sin6_addr, &dst->sin6_addr,
(caddr_t)ip6mu, bu_size + nonce_size + auth_size,
bu_size + nonce_size + sizeof(struct ip6m_opt_authdata) ,
- MIP6_AUTHENTICATOR_LEN);
+ MIP6_AUTHENTICATOR_LEN)) {
+ mip6log((LOG_ERR,
+ "%s:%d: Authenticator caluclation was failed\n",
+ __FILE__, __LINE__));
+ return (EINVAL);
+ }
#ifdef RR_DBG
mip6_hexdump("MN: Authenticator: ", (u_int8_t *)(mopt_auth + 1), MIP6_AUTHENTICATOR_LEN);
#endif
View
6 kame/sys/netinet6/mip6_var.h
@@ -1,4 +1,4 @@
-/* $KAME: mip6_var.h,v 1.108 2003/10/22 02:12:54 keiichi Exp $ */
+/* $KAME: mip6_var.h,v 1.109 2003/10/31 12:19:42 t-momose Exp $ */
/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
@@ -40,7 +40,11 @@
#ifndef _MIP6_VAR_H_
#define _MIP6_VAR_H_
+#if defined(__NetBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3)
#include <sys/callout.h>
+#elif defined(__OpenBSD__)
+#include <sys/timeout.h>
+#endif
#define GET_NETVAL_S(p, v) bcopy((p), &(v), sizeof(v)), v = ntohs(v)
#define GET_NETVAL_L(p, v) bcopy((p), &(v), sizeof(v)), v = ntohl(v)
View
9 openbsd/sys/arch/i386/conf/GENERIC.KAME
@@ -20,3 +20,12 @@ include "arch/i386/conf/GENERIC"
# Source-Specific Multicast (SSM)
#options IGMPV3 # IPv4
#options MLDV2 # IPv6
+
+# Mobile IPv6
+#options MIP6
+#options MIP6_HOME_AGENT
+#options MIP6_MOBILE_NODE
+#pseudo-device hif 1
+#options MIP6_NOHAIPSEC
+#options MIP6_DEBUG
+
View
32 openbsd/sys/netinet/ip_ipsp.c
@@ -1486,3 +1486,35 @@ ipsp_parse_headers(struct mbuf *m, int off, u_int8_t proto)
}
}
#endif /* notyet */
+
+#if (defined(MIP6_HOME_AGENT) || defined(MIP6_MOBILE_NODE)) && !defined(MIP6_NOHAIPSEC)
+int
+key_mip6_update_mobile_node_ipsecdb(haddr, ocoa, ncoa, haaddr)
+ struct sockaddr_in6 *haddr;
+ struct sockaddr_in6 *ocoa; /* not used. may be NULL. */
+ struct sockaddr_in6 *ncoa;
+ struct sockaddr_in6 *haaddr;
+{
+ int s = spltdb();
+
+ /* To be written soon */
+
+ splx(s);
+ return (0);
+}
+
+int
+key_mip6_update_home_agent_ipsecdb(haddr, ocoa, ncoa, haaddr)
+ struct sockaddr_in6 *haddr;
+ struct sockaddr_in6 *ocoa;
+ struct sockaddr_in6 *ncoa;
+ struct sockaddr_in6 *haaddr;
+{
+ int s = spltdb();
+
+ /* To be written soon */
+
+ splx(s);
+ return (0);
+}
+#endif
View
6 openbsd/sys/netinet/ip_ipsp.h
@@ -667,5 +667,11 @@ extern int ipsp_aux_match(struct ipsec_ref *, struct ipsec_ref *,
struct ipsec_ref *, struct ipsec_ref *, struct ipsec_ref *,
struct sockaddr_encap *, struct sockaddr_encap *,
struct sockaddr_encap *, struct sockaddr_encap *);
+#if (defined(MIP6_HOME_AGENT) || defined(MIP6_MOBILE_NODE)) && !defined(MIP6_NOHAIPSEC)
+extern int key_mip6_update_mobile_node_ipsecdb(struct sockaddr_in6 *,
+ struct sockaddr_in6 *, struct sockaddr_in6 *, struct sockaddr_in6 *);
+extern int key_mip6_update_home_agent_ipsecdb(struct sockaddr_in6 *,
+ struct sockaddr_in6 *, struct sockaddr_in6 *, struct sockaddr_in6 *);
+#endif
#endif /* _KERNEL */
#endif /* _NETINET_IPSP_H_ */
View
2  openbsd/sys/netinet/tcp_output.c
@@ -117,7 +117,7 @@
#endif /* TCP_SIGNATURE */
#if defined(INET6) && defined(MIP6)
-static mip6_hdrsiz_tcp(struct tcpcb *);
+static int mip6_hdrsiz_tcp(struct tcpcb *);
#endif /* INET6 && MIP6 */
#ifdef notyet
Please sign in to comment.
Something went wrong with that request. Please try again.