Lines Matching refs:opt2

1190 	struct ipv6_txoptions *opt2;  in ipv6_dup_options()  local
1192 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1193 if (opt2) { in ipv6_dup_options()
1194 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1195 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1196 if (opt2->hopopt) in ipv6_dup_options()
1197 *((char **)&opt2->hopopt) += dif; in ipv6_dup_options()
1198 if (opt2->dst0opt) in ipv6_dup_options()
1199 *((char **)&opt2->dst0opt) += dif; in ipv6_dup_options()
1200 if (opt2->dst1opt) in ipv6_dup_options()
1201 *((char **)&opt2->dst1opt) += dif; in ipv6_dup_options()
1202 if (opt2->srcrt) in ipv6_dup_options()
1203 *((char **)&opt2->srcrt) += dif; in ipv6_dup_options()
1204 refcount_set(&opt2->refcnt, 1); in ipv6_dup_options()
1206 return opt2; in ipv6_dup_options()
1253 struct ipv6_txoptions *opt2; in ipv6_renew_options() local
1272 tot_len += sizeof(*opt2); in ipv6_renew_options()
1273 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options()
1274 if (!opt2) in ipv6_renew_options()
1277 memset(opt2, 0, tot_len); in ipv6_renew_options()
1278 refcount_set(&opt2->refcnt, 1); in ipv6_renew_options()
1279 opt2->tot_len = tot_len; in ipv6_renew_options()
1280 p = (char *)(opt2 + 1); in ipv6_renew_options()
1282 ipv6_renew_option(IPV6_HOPOPTS, &opt2->hopopt, in ipv6_renew_options()
1285 ipv6_renew_option(IPV6_RTHDRDSTOPTS, &opt2->dst0opt, in ipv6_renew_options()
1289 (struct ipv6_opt_hdr **)&opt2->srcrt, in ipv6_renew_options()
1292 ipv6_renew_option(IPV6_DSTOPTS, &opt2->dst1opt, in ipv6_renew_options()
1296 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) + in ipv6_renew_options()
1297 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) + in ipv6_renew_options()
1298 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0); in ipv6_renew_options()
1299 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0); in ipv6_renew_options()
1301 return opt2; in ipv6_renew_options()