Lines Matching defs:ut
1756 static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
1762 for (i = 0; i < nr; i++, ut++) {
1765 memcpy(&t->id, &ut->id, sizeof(struct xfrm_id));
1766 memcpy(&t->saddr, &ut->saddr,
1768 t->reqid = ut->reqid;
1769 t->mode = ut->mode;
1770 t->share = ut->share;
1771 t->optional = ut->optional;
1772 t->aalgos = ut->aalgos;
1773 t->ealgos = ut->ealgos;
1774 t->calgos = ut->calgos;
1777 t->encap_family = ut->family;
1781 static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family,
1795 /* We never validated the ut->family value, so many
1797 * never made and ut->family was ignored because all
1802 if (!ut[i].family)
1803 ut[i].family = family;
1805 switch (ut[i].mode) {
1808 if (ut[i].optional && dir == XFRM_POLICY_OUT) {
1814 if (ut[i].family != prev_family) {
1820 if (ut[i].mode >= XFRM_MODE_MAX) {
1825 prev_family = ut[i].family;
1827 switch (ut[i].family) {
1839 if (!xfrm_id_proto_valid(ut[i].id.proto)) {
2708 struct xfrm_user_tmpl *ut;
2739 ut = nla_data(rt);
2741 for (i = 0; i < xp->xfrm_nr; i++, ut++) {
2746 x->props.family = ut->family;
3487 struct xfrm_user_tmpl *ut = (struct xfrm_user_tmpl *) (p + 1);
3517 nr = ((len - sizeof(*p)) / sizeof(*ut));
3518 if (validate_tmpl(nr, ut, p->sel.family, p->dir, NULL))
3532 copy_templates(xp, ut, nr);