Lines Matching refs:t

77 	struct xfrm_state *t = NULL;  in ipcomp6_tunnel_create()  local
79 t = xfrm_state_alloc(net); in ipcomp6_tunnel_create()
80 if (!t) in ipcomp6_tunnel_create()
83 t->id.proto = IPPROTO_IPV6; in ipcomp6_tunnel_create()
84 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_create()
85 if (!t->id.spi) in ipcomp6_tunnel_create()
88 memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr)); in ipcomp6_tunnel_create()
89 memcpy(&t->sel, &x->sel, sizeof(t->sel)); in ipcomp6_tunnel_create()
90 t->props.family = AF_INET6; in ipcomp6_tunnel_create()
91 t->props.mode = x->props.mode; in ipcomp6_tunnel_create()
92 memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); in ipcomp6_tunnel_create()
93 memcpy(&t->mark, &x->mark, sizeof(t->mark)); in ipcomp6_tunnel_create()
94 t->if_id = x->if_id; in ipcomp6_tunnel_create()
96 if (xfrm_init_state(t)) in ipcomp6_tunnel_create()
99 atomic_set(&t->tunnel_users, 1); in ipcomp6_tunnel_create()
102 return t; in ipcomp6_tunnel_create()
105 t->km.state = XFRM_STATE_DEAD; in ipcomp6_tunnel_create()
106 xfrm_state_put(t); in ipcomp6_tunnel_create()
107 t = NULL; in ipcomp6_tunnel_create()
115 struct xfrm_state *t = NULL; in ipcomp6_tunnel_attach() local
121 t = xfrm_state_lookup(net, mark, (xfrm_address_t *)&x->id.daddr, in ipcomp6_tunnel_attach()
123 if (!t) { in ipcomp6_tunnel_attach()
124 t = ipcomp6_tunnel_create(x); in ipcomp6_tunnel_attach()
125 if (!t) { in ipcomp6_tunnel_attach()
129 xfrm_state_insert(t); in ipcomp6_tunnel_attach()
130 xfrm_state_hold(t); in ipcomp6_tunnel_attach()
132 x->tunnel = t; in ipcomp6_tunnel_attach()
133 atomic_inc(&t->tunnel_users); in ipcomp6_tunnel_attach()