| 2784 | #undef PKTOPT_EXTHDRCPY |
| 2785 | |
| 2786 | struct ip6_pktopts * |
| 2787 | ip6_copypktopts(struct ip6_pktopts *src, int canwait) |
| 2788 | { |
| 2789 | int error; |
| 2790 | struct ip6_pktopts *dst; |
| 2791 | |
| 2792 | dst = malloc(sizeof(*dst), M_IP6OPT, canwait); |
| 2793 | if (dst == NULL) |
| 2794 | return (NULL); |
| 2795 | ip6_initpktopts(dst); |
| 2796 | |
| 2797 | if ((error = copypktopts(dst, src, canwait)) != 0) { |
| 2798 | free(dst, M_IP6OPT); |
| 2799 | return (NULL); |
| 2800 | } |
| 2801 | |
| 2802 | return (dst); |
| 2803 | } |
| 2804 | |
| 2805 | void |
| 2806 | ip6_freepcbopts(struct ip6_pktopts *pktopt) |
no test coverage detected