if ((exchange->phase == 1 && exchange->type != ISAKMP_EXCH_ID_PROT && exchange->type != ISAKMP_EXCH_AGGRESSIVE && exchange->type != ISAKMP_EXCH_INFO) || (exchange->phase == 2 && exchange->type != IKE_EXCH_QUICK_MODE && exchange->type != ISAKMP_EXCH_INFO))
if (exchange->type != ISAKMP_EXCH_TRANSACTION && ((exchange->phase == 1 && exchange->type != ISAKMP_EXCH_ID_PROT && exchange->type != ISAKMP_EXCH_AGGRESSIVE && exchange->type != ISAKMP_EXCH_INFO) || (exchange->phase == 2 && exchange->type != IKE_EXCH_QUICK_MODE && exchange->type != ISAKMP_EXCH_INFO)))
ipsec_initiator (struct message *msg){  struct exchange *exchange = msg->exchange;  int (**script) (struct message *msg) = 0;  /* Check that the SA is coherent with the IKE rules.  */  if ((exchange->phase == 1 && exchange->type != ISAKMP_EXCH_ID_PROT       && exchange->type != ISAKMP_EXCH_AGGRESSIVE       && exchange->type != ISAKMP_EXCH_INFO)      || (exchange->phase == 2 && exchange->type != IKE_EXCH_QUICK_MODE	  && exchange->type != ISAKMP_EXCH_INFO))    {      log_print ("ipsec_initiator: unsupported exchange type %d in phase %d",		 exchange->type, exchange->phase);      return -1;    }  switch (exchange->type)    {    case ISAKMP_EXCH_ID_PROT:      script = ike_main_mode_initiator;      break;#ifdef USE_AGGRESSIVE    case ISAKMP_EXCH_AGGRESSIVE:      script = ike_aggressive_initiator;      break;#endif    case ISAKMP_EXCH_INFO:      return message_send_info (msg);    case IKE_EXCH_QUICK_MODE:      script = ike_quick_mode_initiator;      break;    default:      log_print ("ipsec_initiator: unsupported exchange type %d",		 exchange->type);      return -1;    }  /* Run the script code for this step.  */  if (script)    return script[exchange->step] (msg);  return 0;}