Lines Matching refs:ut
1524 static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
1530 for (i = 0; i < nr; i++, ut++) {
1533 memcpy(&t->id, &ut->id, sizeof(struct xfrm_id));
1534 memcpy(&t->saddr, &ut->saddr,
1536 t->reqid = ut->reqid;
1537 t->mode = ut->mode;
1538 t->share = ut->share;
1539 t->optional = ut->optional;
1540 t->aalgos = ut->aalgos;
1541 t->ealgos = ut->ealgos;
1542 t->calgos = ut->calgos;
1545 t->encap_family = ut->family;
1549 static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family)
1560 /* We never validated the ut->family value, so many
1562 * never made and ut->family was ignored because all
1567 if (!ut[i].family)
1568 ut[i].family = family;
1570 switch (ut[i].mode) {
1575 if (ut[i].family != prev_family)
1579 if (ut[i].mode >= XFRM_MODE_MAX)
1582 prev_family = ut[i].family;
1584 switch (ut[i].family) {
1595 if (!xfrm_id_proto_valid(ut[i].id.proto))
2426 struct xfrm_user_tmpl *ut;
2457 ut = nla_data(rt);
2459 for (i = 0; i < xp->xfrm_nr; i++, ut++) {
2464 x->props.family = ut->family;
3196 struct xfrm_user_tmpl *ut = (struct xfrm_user_tmpl *) (p + 1);
3226 nr = ((len - sizeof(*p)) / sizeof(*ut));
3227 if (validate_tmpl(nr, ut, p->sel.family))
3241 copy_templates(xp, ut, nr);