Lines Matching refs:opt2
716 struct ipv6_txoptions *opt2; in ipv6_dup_options() local
718 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
719 if (opt2) { in ipv6_dup_options()
720 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
721 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
722 if (opt2->hopopt) in ipv6_dup_options()
723 *((char **)&opt2->hopopt) += dif; in ipv6_dup_options()
724 if (opt2->dst0opt) in ipv6_dup_options()
725 *((char **)&opt2->dst0opt) += dif; in ipv6_dup_options()
726 if (opt2->dst1opt) in ipv6_dup_options()
727 *((char **)&opt2->dst1opt) += dif; in ipv6_dup_options()
728 if (opt2->srcrt) in ipv6_dup_options()
729 *((char **)&opt2->srcrt) += dif; in ipv6_dup_options()
730 atomic_set(&opt2->refcnt, 1); in ipv6_dup_options()
732 return opt2; in ipv6_dup_options()
768 struct ipv6_txoptions *opt2; in ipv6_renew_options() local
788 tot_len += sizeof(*opt2); in ipv6_renew_options()
789 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options()
790 if (!opt2) in ipv6_renew_options()
793 memset(opt2, 0, tot_len); in ipv6_renew_options()
794 atomic_set(&opt2->refcnt, 1); in ipv6_renew_options()
795 opt2->tot_len = tot_len; in ipv6_renew_options()
796 p = (char *)(opt2 + 1); in ipv6_renew_options()
800 &opt2->hopopt, &p); in ipv6_renew_options()
806 &opt2->dst0opt, &p); in ipv6_renew_options()
812 (struct ipv6_opt_hdr **)&opt2->srcrt, &p); in ipv6_renew_options()
818 &opt2->dst1opt, &p); in ipv6_renew_options()
822 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) + in ipv6_renew_options()
823 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) + in ipv6_renew_options()
824 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0); in ipv6_renew_options()
825 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0); in ipv6_renew_options()
827 return opt2; in ipv6_renew_options()
829 sock_kfree_s(sk, opt2, opt2->tot_len); in ipv6_renew_options()