Lines Matching refs:ut

1756 static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,  in copy_templates()  argument
1762 for (i = 0; i < nr; i++, ut++) { in copy_templates()
1765 memcpy(&t->id, &ut->id, sizeof(struct xfrm_id)); in copy_templates()
1766 memcpy(&t->saddr, &ut->saddr, in copy_templates()
1768 t->reqid = ut->reqid; in copy_templates()
1769 t->mode = ut->mode; in copy_templates()
1770 t->share = ut->share; in copy_templates()
1771 t->optional = ut->optional; in copy_templates()
1772 t->aalgos = ut->aalgos; in copy_templates()
1773 t->ealgos = ut->ealgos; in copy_templates()
1774 t->calgos = ut->calgos; in copy_templates()
1777 t->encap_family = ut->family; in copy_templates()
1781 static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family, in validate_tmpl() argument
1802 if (!ut[i].family) in validate_tmpl()
1803 ut[i].family = family; in validate_tmpl()
1805 switch (ut[i].mode) { in validate_tmpl()
1808 if (ut[i].optional && dir == XFRM_POLICY_OUT) { in validate_tmpl()
1814 if (ut[i].family != prev_family) { in validate_tmpl()
1820 if (ut[i].mode >= XFRM_MODE_MAX) { in validate_tmpl()
1825 prev_family = ut[i].family; in validate_tmpl()
1827 switch (ut[i].family) { in validate_tmpl()
1839 if (!xfrm_id_proto_valid(ut[i].id.proto)) { in validate_tmpl()
2708 struct xfrm_user_tmpl *ut; in xfrm_add_acquire() local
2739 ut = nla_data(rt); in xfrm_add_acquire()
2741 for (i = 0; i < xp->xfrm_nr; i++, ut++) { in xfrm_add_acquire()
2746 x->props.family = ut->family; in xfrm_add_acquire()
3487 struct xfrm_user_tmpl *ut = (struct xfrm_user_tmpl *) (p + 1); in xfrm_compile_policy() local
3517 nr = ((len - sizeof(*p)) / sizeof(*ut)); in xfrm_compile_policy()
3518 if (validate_tmpl(nr, ut, p->sel.family, p->dir, NULL)) in xfrm_compile_policy()
3532 copy_templates(xp, ut, nr); in xfrm_compile_policy()