ip6po_nexthop
if (opts && opts->ip6po_nexthop) {
sin6_next = satosin6(opts->ip6po_nexthop);
if (opt->ip6po_pktinfo || opt->ip6po_nexthop ||
if (pktopt && pktopt->ip6po_nexthop) {
optdata = (void *)pktopt->ip6po_nexthop;
optdatalen = pktopt->ip6po_nexthop->sa_len;
if (pktopt->ip6po_nexthop)
kfree(pktopt->ip6po_nexthop, M_IP6OPT);
pktopt->ip6po_nexthop = NULL;
if (src->ip6po_nexthop) {
dst->ip6po_nexthop = kmalloc(src->ip6po_nexthop->sa_len,
if (dst->ip6po_nexthop == NULL)
bcopy(src->ip6po_nexthop, dst->ip6po_nexthop,
src->ip6po_nexthop->sa_len);
if (dst->ip6po_nexthop) kfree(dst->ip6po_nexthop, M_IP6OPT);
if (src->ip6po_nexthop) {
dst->ip6po_nexthop = kmalloc(src->ip6po_nexthop->sa_len,
if (dst->ip6po_nexthop == NULL)
bcopy(src->ip6po_nexthop, dst->ip6po_nexthop,
src->ip6po_nexthop->sa_len);
opt->ip6po_nexthop = kmalloc(*buf, M_IP6OPT, M_NOWAIT);
if (opt->ip6po_nexthop == NULL)
bcopy(buf, opt->ip6po_nexthop, *buf);