• Home
  • Raw
  • Download

Lines Matching refs:iph1

221 	struct ph1handle *iph1;  in dumpph1()  local
227 LIST_FOREACH(iph1, &ph1tree, chain) in dumpph1()
238 LIST_FOREACH(iph1, &ph1tree, chain) { in dumpph1()
239 memcpy(&pd->index, &iph1->index, sizeof(iph1->index)); in dumpph1()
240 pd->status = iph1->status; in dumpph1()
241 pd->side = iph1->side; in dumpph1()
242 memcpy(&pd->remote, iph1->remote, sysdep_sa_len(iph1->remote)); in dumpph1()
243 memcpy(&pd->local, iph1->local, sysdep_sa_len(iph1->local)); in dumpph1()
244 pd->version = iph1->version; in dumpph1()
245 pd->etype = iph1->etype; in dumpph1()
246 pd->created = iph1->created; in dumpph1()
247 pd->ph2cnt = iph1->ph2cnt; in dumpph1()
260 struct ph1handle *iph1; in newph1() local
263 iph1 = racoon_calloc(1, sizeof(*iph1)); in newph1()
264 if (iph1 == NULL) in newph1()
267 iph1->status = PHASE1ST_SPAWN; in newph1()
270 iph1->dpd_support = 0; in newph1()
271 iph1->dpd_lastack = 0; in newph1()
272 iph1->dpd_seq = 0; in newph1()
273 iph1->dpd_fails = 0; in newph1()
274 iph1->dpd_r_u = NULL; in newph1()
277 return iph1; in newph1()
284 delph1(iph1) in delph1() argument
285 struct ph1handle *iph1; in delph1()
287 if (iph1 == NULL)
291 script_hook(iph1, SCRIPT_PHASE1_DOWN);
293 EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_DOWN, NULL);
296 if (iph1->natt_flags & NAT_KA_QUEUED)
297 natt_keepalive_remove (iph1->local, iph1->remote);
299 if (iph1->natt_options) {
300 racoon_free(iph1->natt_options);
301 iph1->natt_options = NULL;
306 if (iph1->mode_cfg)
307 isakmp_cfg_rmstate(iph1);
311 SCHED_KILL(iph1->dpd_r_u);
314 if (iph1->remote) {
315 racoon_free(iph1->remote);
316 iph1->remote = NULL;
318 if (iph1->local) {
319 racoon_free(iph1->local);
320 iph1->local = NULL;
322 if (iph1->approval) {
323 delisakmpsa(iph1->approval);
324 iph1->approval = NULL;
327 VPTRINIT(iph1->authstr);
329 sched_scrub_param(iph1);
330 iph1->sce = NULL;
331 iph1->scr = NULL;
333 VPTRINIT(iph1->sendbuf);
335 VPTRINIT(iph1->dhpriv);
336 VPTRINIT(iph1->dhpub);
337 VPTRINIT(iph1->dhpub_p);
338 VPTRINIT(iph1->dhgxy);
339 VPTRINIT(iph1->nonce);
340 VPTRINIT(iph1->nonce_p);
341 VPTRINIT(iph1->skeyid);
342 VPTRINIT(iph1->skeyid_d);
343 VPTRINIT(iph1->skeyid_a);
344 VPTRINIT(iph1->skeyid_e);
345 VPTRINIT(iph1->key);
346 VPTRINIT(iph1->hash);
347 VPTRINIT(iph1->sig);
348 VPTRINIT(iph1->sig_p);
349 oakley_delcert(iph1->cert);
350 iph1->cert = NULL;
351 oakley_delcert(iph1->cert_p);
352 iph1->cert_p = NULL;
353 oakley_delcert(iph1->crl_p);
354 iph1->crl_p = NULL;
355 oakley_delcert(iph1->cr_p);
356 iph1->cr_p = NULL;
357 VPTRINIT(iph1->id);
358 VPTRINIT(iph1->id_p);
360 if(iph1->approval != NULL)
361 delisakmpsa(iph1->approval);
363 if (iph1->ivm) {
364 oakley_delivm(iph1->ivm);
365 iph1->ivm = NULL;
368 VPTRINIT(iph1->sa);
369 VPTRINIT(iph1->sa_ret);
372 VPTRINIT(iph1->gi_i);
373 VPTRINIT(iph1->gi_r);
375 gssapi_free_state(iph1);
378 racoon_free(iph1);
385 insph1(iph1) in insph1() argument
386 struct ph1handle *iph1; in insph1()
389 if (iph1->remote == NULL) {
394 LIST_INSERT_HEAD(&ph1tree, iph1, chain);
400 remph1(iph1) in remph1() argument
401 struct ph1handle *iph1; in remph1()
403 LIST_REMOVE(iph1, chain);
475 getph2bymsgid(iph1, msgid) in getph2bymsgid() argument
476 struct ph1handle *iph1; in getph2bymsgid()
482 if (p->msgid == msgid && p->ph1 == iph1)
774 bindph12(iph1, iph2) in bindph12() argument
775 struct ph1handle *iph1; in bindph12()
778 iph2->ph1 = iph1;
779 LIST_INSERT_HEAD(&iph1->ph2tree, iph2, ph1bind);
1081 struct ph1handle *iph1; in revalidate_ph2() local
1129 iph1=iph2->ph1; in revalidate_ph2()
1131 iph1=getph1byaddr(iph2->src, iph2->dst, 0); in revalidate_ph2()
1133 if(iph1 != NULL && iph1->rmconf != NULL) { in revalidate_ph2()
1134 check_level = iph1->rmconf->pcheck_level; in revalidate_ph2()
1136 if(iph1 != NULL) in revalidate_ph2()
1298 static void remove_ph1(struct ph1handle *iph1){ in remove_ph1() argument
1301 if(iph1 == NULL) in remove_ph1()
1307 if (iph1->status == PHASE1ST_ESTABLISHED){ in remove_ph1()
1308 for (iph2 = LIST_FIRST(&iph1->ph2tree); iph2; iph2 = iph2_next) { in remove_ph1()
1312 isakmp_info_send_d1(iph1); in remove_ph1()
1314 iph1->status = PHASE1ST_EXPIRED; in remove_ph1()
1315 iph1->sce = sched_new(1, isakmp_ph1delete_stub, iph1); in remove_ph1()
1356 static int revalidate_ph1(struct ph1handle *iph1){ in revalidate_ph1() argument
1360 if(iph1 == NULL || in revalidate_ph1()
1361 iph1->approval == NULL || in revalidate_ph1()
1362 iph1->rmconf == NULL) in revalidate_ph1()
1365 approval=iph1->approval; in revalidate_ph1()
1367 for (e = iph1->rmconf->etypes; e != NULL; e = e->next){ in revalidate_ph1()
1368 if (iph1->etype == e->type) in revalidate_ph1()
1378 if (iph1->etype == ISAKMP_ETYPE_AGG && in revalidate_ph1()
1379 approval->dh_group != iph1->rmconf->dh_group){ in revalidate_ph1()
1385 for (p=iph1->rmconf->proposal; p != NULL; p=p->next){ in revalidate_ph1()
1401 switch (iph1->rmconf->pcheck_level) { in revalidate_ph1()
1471 if (iph1->etype != ISAKMP_ETYPE_AGG && in revalidate_ph1()