Lines Matching refs:opt2

1235 	struct ipv6_txoptions *opt2;  in ipv6_dup_options()  local
1237 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1238 if (opt2) { in ipv6_dup_options()
1239 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1240 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1241 if (opt2->hopopt) in ipv6_dup_options()
1242 *((char **)&opt2->hopopt) += dif; in ipv6_dup_options()
1243 if (opt2->dst0opt) in ipv6_dup_options()
1244 *((char **)&opt2->dst0opt) += dif; in ipv6_dup_options()
1245 if (opt2->dst1opt) in ipv6_dup_options()
1246 *((char **)&opt2->dst1opt) += dif; in ipv6_dup_options()
1247 if (opt2->srcrt) in ipv6_dup_options()
1248 *((char **)&opt2->srcrt) += dif; in ipv6_dup_options()
1249 refcount_set(&opt2->refcnt, 1); in ipv6_dup_options()
1251 return opt2; in ipv6_dup_options()
1298 struct ipv6_txoptions *opt2; in ipv6_renew_options() local
1317 tot_len += sizeof(*opt2); in ipv6_renew_options()
1318 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options()
1319 if (!opt2) in ipv6_renew_options()
1322 memset(opt2, 0, tot_len); in ipv6_renew_options()
1323 refcount_set(&opt2->refcnt, 1); in ipv6_renew_options()
1324 opt2->tot_len = tot_len; in ipv6_renew_options()
1325 p = (char *)(opt2 + 1); in ipv6_renew_options()
1327 ipv6_renew_option(IPV6_HOPOPTS, &opt2->hopopt, in ipv6_renew_options()
1330 ipv6_renew_option(IPV6_RTHDRDSTOPTS, &opt2->dst0opt, in ipv6_renew_options()
1334 (struct ipv6_opt_hdr **)&opt2->srcrt, in ipv6_renew_options()
1337 ipv6_renew_option(IPV6_DSTOPTS, &opt2->dst1opt, in ipv6_renew_options()
1341 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) + in ipv6_renew_options()
1342 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) + in ipv6_renew_options()
1343 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0); in ipv6_renew_options()
1344 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0); in ipv6_renew_options()
1346 return opt2; in ipv6_renew_options()