/*
- * Copyright (c) 2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2011-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
return (EHOSTUNREACH);
in6 = in6_selectsrc(dstsin6, NULL, NULL, &ro, NULL, &storage,
nrq->nrq_ifscope, &error);
- if (ro.ro_rt)
- rtfree(ro.ro_rt);
+ ROUTE_RELEASE(&ro);
if (!in6 || error)
return (error);
memset(&nrp, 0, sizeof(nrp));
nrp.nrp_flags |= NETSRC_IP6_FLAG_TENTATIVE;
if (ia->ia6_flags & IN6_IFF_DEPRECATED)
nrp.nrp_flags |= NETSRC_IP6_FLAG_DEPRECATED;
+ if (ia->ia6_flags & IN6_IFF_OPTIMISTIC)
+ nrp.nrp_flags |= NETSRC_IP6_FLAG_OPTIMISTIC;
+ if (ia->ia6_flags & IN6_IFF_SECURED)
+ nrp.nrp_flags |= NETSRC_IP6_FLAG_SECURED;
sin6.sin6_family = AF_INET6;
sin6.sin6_len = sizeof(sin6);
memcpy(&sin6.sin6_addr, in6, sizeof(*in6));