Lines Matching refs:opt2
1183 struct ipv6_txoptions *opt2;
1185 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
1186 if (opt2) {
1187 long dif = (char *)opt2 - (char *)opt;
1188 memcpy(opt2, opt, opt->tot_len);
1189 if (opt2->hopopt)
1190 *((char **)&opt2->hopopt) += dif;
1191 if (opt2->dst0opt)
1192 *((char **)&opt2->dst0opt) += dif;
1193 if (opt2->dst1opt)
1194 *((char **)&opt2->dst1opt) += dif;
1195 if (opt2->srcrt)
1196 *((char **)&opt2->srcrt) += dif;
1197 refcount_set(&opt2->refcnt, 1);
1199 return opt2;
1246 struct ipv6_txoptions *opt2;
1265 tot_len += sizeof(*opt2);
1266 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
1267 if (!opt2)
1270 memset(opt2, 0, tot_len);
1271 refcount_set(&opt2->refcnt, 1);
1272 opt2->tot_len = tot_len;
1273 p = (char *)(opt2 + 1);
1275 ipv6_renew_option(IPV6_HOPOPTS, &opt2->hopopt,
1278 ipv6_renew_option(IPV6_RTHDRDSTOPTS, &opt2->dst0opt,
1282 (struct ipv6_opt_hdr **)&opt2->srcrt,
1285 ipv6_renew_option(IPV6_DSTOPTS, &opt2->dst1opt,
1289 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) +
1290 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) +
1291 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0);
1292 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0);
1294 return opt2;