struct secasvar *sav)
{
struct sockaddr_in6* dst6;
- struct route *ro6;
+ struct route_in6 *ro6;
struct ip6_hdr *ip6;
errno_t error = 0;
dst6->sin6_family = AF_INET6;
dst6->sin6_len = sizeof(*dst6);
dst6->sin6_addr = ip6->ip6_dst;
- rtalloc_scoped(ro6, sav->sah->outgoing_if);
+ rtalloc_scoped((struct route *)ro6, sav->sah->outgoing_if);
if (ro6->ro_rt) {
RT_LOCK(ro6->ro_rt);
}
dst6 = (struct sockaddr_in6 *)(void *)ro6->ro_rt->rt_gateway;
RT_UNLOCK(ro6->ro_rt);
ROUTE_RELEASE(&state->ro);
- route_copyout(&state->ro, ro6, sizeof(state->ro));
+ route_copyout((struct route *)&state->ro, (struct route *)ro6, sizeof(struct route_in6));
state->dst = (struct sockaddr *)dst6;
state->tunneled = 6;
// release sadb_mutex, after updating sah's route cache
// grab sadb_mutex, before updating sah's route cache
lck_mtx_lock(sadb_mutex);
- ro4= &sav->sah->sa_route;
+ ro4= (struct route *)&sav->sah->sa_route;
dst4 = (struct sockaddr_in *)(void *)&ro4->ro_dst;
if (ro4->ro_rt != NULL) {
RT_LOCK(ro4->ro_rt);
dst4 = (struct sockaddr_in *)(void *)ro4->ro_rt->rt_gateway;
RT_UNLOCK(ro4->ro_rt);
ROUTE_RELEASE(&state->ro);
- route_copyout(&state->ro, ro4, sizeof(state->ro));
+ route_copyout((struct route *)&state->ro, ro4, sizeof(struct route));
state->dst = (struct sockaddr *)dst4;
state->tunneled = 4;
// release sadb_mutex, after updating sah's route cache
int error = 0;
int plen;
struct sockaddr_in6* dst6;
- struct route *ro6;
+ struct route_in6 *ro6;
/* validity check */
if (sav == NULL || sav->sah == NULL || sav->sah->saidx.mode != IPSEC_MODE_TUNNEL) {
// grab sadb_mutex, to update sah's route cache and get a local copy of it
lck_mtx_lock(sadb_mutex);
- ro4 = &sav->sah->sa_route;
+ ro4 = (struct route *)&sav->sah->sa_route;
dst4 = (struct sockaddr_in *)(void *)&ro4->ro_dst;
if (ro4->ro_rt) {
RT_LOCK(ro4->ro_rt);
} else {
RT_UNLOCK(ro4->ro_rt);
}
- route_copyout(&ro4_copy, ro4, sizeof(ro4_copy));
+ route_copyout(&ro4_copy, ro4, sizeof(struct route));
// release sadb_mutex, after updating sah's route cache and getting a local copy
lck_mtx_unlock(sadb_mutex);
state->m = ipsec4_splithdr(state->m);
state->m = NULL;
// grab sadb_mutex, to synchronize the sah's route cache with the local copy
lck_mtx_lock(sadb_mutex);
- route_copyin(&ro4_copy, ro4, sizeof(ro4_copy));
+ route_copyin(&ro4_copy, ro4, sizeof(struct route));
lck_mtx_unlock(sadb_mutex);
if (error != 0)
goto bad;
dst6->sin6_family = AF_INET6;
dst6->sin6_len = sizeof(*dst6);
dst6->sin6_addr = ip6->ip6_dst;
- rtalloc_scoped(ro6, sav->sah->outgoing_if);
+ rtalloc_scoped((struct route *)ro6, sav->sah->outgoing_if);
if (ro6->ro_rt) {
RT_LOCK(ro6->ro_rt);
}
dst6 = (struct sockaddr_in6 *)(void *)ro6->ro_rt->rt_gateway;
RT_UNLOCK(ro6->ro_rt);
ROUTE_RELEASE(&state->ro);
- route_copyout(&state->ro, ro6, sizeof(state->ro));
+ route_copyout((struct route *)&state->ro, (struct route *)ro6, sizeof(struct route_in6));
state->dst = (struct sockaddr *)dst6;
state->tunneled = 6;
// release sadb_mutex, after updating sah's route cache
rt_key(sav->sah->sa_route.ro_rt)->sa_family != AF_INET)
ROUTE_RELEASE(&sav->sah->sa_route);
- route_copyout(&ro, &sav->sah->sa_route, sizeof(ro));
+ route_copyout(&ro, (struct route *)&sav->sah->sa_route, sizeof(struct route));
lck_mtx_unlock(sadb_mutex);
necp_mark_packet_as_keepalive(m, TRUE);
// grab sadb_mutex, to synchronize the sah's route cache with the local copy
lck_mtx_lock(sadb_mutex);
- route_copyin(&ro, &sav->sah->sa_route, sizeof(ro));
+ route_copyin(&ro, (struct route *)&sav->sah->sa_route, sizeof(struct route));
lck_mtx_unlock(sadb_mutex);
if (error == 0) {
sav->natt_last_activity = natt_now;