Lines Matching refs:opt2
1207 struct ipv6_txoptions *opt2;
1209 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
1210 if (opt2) {
1211 long dif = (char *)opt2 - (char *)opt;
1212 memcpy(opt2, opt, opt->tot_len);
1213 if (opt2->hopopt)
1214 *((char **)&opt2->hopopt) += dif;
1215 if (opt2->dst0opt)
1216 *((char **)&opt2->dst0opt) += dif;
1217 if (opt2->dst1opt)
1218 *((char **)&opt2->dst1opt) += dif;
1219 if (opt2->srcrt)
1220 *((char **)&opt2->srcrt) += dif;
1221 refcount_set(&opt2->refcnt, 1);
1223 return opt2;
1270 struct ipv6_txoptions *opt2;
1289 tot_len += sizeof(*opt2);
1290 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
1291 if (!opt2)
1294 memset(opt2, 0, tot_len);
1295 refcount_set(&opt2->refcnt, 1);
1296 opt2->tot_len = tot_len;
1297 p = (char *)(opt2 + 1);
1299 ipv6_renew_option(IPV6_HOPOPTS, &opt2->hopopt,
1302 ipv6_renew_option(IPV6_RTHDRDSTOPTS, &opt2->dst0opt,
1306 (struct ipv6_opt_hdr **)&opt2->srcrt,
1309 ipv6_renew_option(IPV6_DSTOPTS, &opt2->dst1opt,
1313 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) +
1314 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) +
1315 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0);
1316 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0);
1318 return opt2;